pub struct RegistryBuilder {
    alternative: Option<String>,
    token: Option<Token>,
    auth_required: bool,
    http_index: bool,
    http_api: bool,
    api: bool,
    configure_token: bool,
    configure_registry: bool,
    custom_responders: HashMap<&'static str, Box<dyn Send + Fn(&Request, &HttpServer) -> Response>>,
}
Expand description

A builder for initializing registries.

Fields§

§alternative: Option<String>

If set, configures an alternate registry with the given name.

§token: Option<Token>

The authorization token for the registry.

§auth_required: bool

If set, the registry requires authorization for all operations.

§http_index: bool

If set, serves the index over http.

§http_api: bool

If set, serves the API over http.

§api: bool

If set, config.json includes ‘api’

§configure_token: bool

Write the token in the configuration.

§configure_registry: bool

Write the registry in configuration.

§custom_responders: HashMap<&'static str, Box<dyn Send + Fn(&Request, &HttpServer) -> Response>>

API responders.

Implementations§

Adds a custom HTTP response for a specific url

Sets whether or not to initialize as an alternative registry.

Sets whether or not to initialize as an alternative registry.

Prevents placing a token in the configuration

Prevents adding the registry to the configuration.

Sets the token value

Sets this registry to require the authentication token for all operations.

Operate the index over http

Operate the api over http

The registry has no api.

Initializes the registry.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 136 bytes