pub struct BootstrapAccount { /* private fields */ }Expand description
Credentials used to create an application’s first account.
Implementations§
Source§impl BootstrapAccount
impl BootstrapAccount
Sourcepub fn required_from_env() -> Result<Self, BootstrapAccountError>
pub fn required_from_env() -> Result<Self, BootstrapAccountError>
Loads a required bootstrap account from the standard environment keys.
§Errors
Returns BootstrapAccountError when values are missing, incomplete,
or not valid Unicode.
Sourcepub fn optional_from_env() -> Result<Option<Self>, BootstrapAccountError>
pub fn optional_from_env() -> Result<Option<Self>, BootstrapAccountError>
Loads an optional bootstrap account from the standard environment keys.
A completely absent configuration returns None; partially configured
credentials are rejected.
§Errors
Returns BootstrapAccountError when values are incomplete or not
valid Unicode.
Sourcepub fn from_required_values(
email: Option<String>,
password: Option<String>,
full_name: Option<String>,
) -> Result<Self, BootstrapAccountError>
pub fn from_required_values( email: Option<String>, password: Option<String>, full_name: Option<String>, ) -> Result<Self, BootstrapAccountError>
Builds a required bootstrap account from caller-provided values.
§Errors
Returns BootstrapAccountError::Missing when every value is absent,
or BootstrapAccountError::Incomplete when only some are present.
Sourcepub fn from_optional_values(
email: Option<String>,
password: Option<String>,
full_name: Option<String>,
) -> Result<Option<Self>, BootstrapAccountError>
pub fn from_optional_values( email: Option<String>, password: Option<String>, full_name: Option<String>, ) -> Result<Option<Self>, BootstrapAccountError>
Builds an optional bootstrap account from caller-provided values.
§Errors
Returns BootstrapAccountError::Incomplete when only some values are
present.