[−][src]Struct fxa_email_service::settings::Settings
The root settings object.
Fields
authdb: AuthDb
Settings related to fxa-auth-db-mysql,
which is used to store
bounce, complaint and delivery notifications.
aws: Aws
Settings for AWS, including region, access keys and URLs for SQS queues.
deliveryproblemlimits: DeliveryProblemLimits
Controls the thresholds and behaviour
for bounce and complaint reports.
If delivery problem limits are enabled,
emails sent to offending addresses
will fail with a 429 error.
env: Env
The env sets which environment we are in.
It defaults to dev if not set.
hmackey: String
The HMAC key to use internally for hashing message ids. This is sensitive data and will not be logged.
host: Host
log: Log
The logging settings, about level and formatting.
port: u16
The port this application is listening to.
provider: Provider
Settings controlling the default email provider.
redis: Redis
Settings for Redis, which is used to store metadata associated with a message.
secretkey: String
Setting for a secret key used by Rocket.
sender: Sender
Controls the name and email address
that are used for the From and Sender
email headers.
sendgrid: Option<Sendgrid>
Settings for Sendgrid.
sentry: Option<Sentry>
Settings for Sentry.
smtp: Smtp
Settings for SMTP custom provider.
socketlabs: Option<SocketLabs>
Settings for SocketLabs.
Methods
impl Settings[src]
impl Settingspub fn new() -> Result<Self, ConfigError>[src]
pub fn new() -> Result<Self, ConfigError>Construct a Settings instance, populating it with data from the file
system and local environment.
Precedence (earlier items override later ones):
- Environment variables:
$FXA_EMAIL_<UPPERCASE_KEY_NAME> - File:
config/local.json - File:
config/<$FXA_EMAIL_ENV>.json - File:
config/default.json
Immediately before returning, the parsed config object will be logged to the console.
pub fn build_rocket_config(&self) -> Result<RocketConfig, RocketConfigError>[src]
pub fn build_rocket_config(&self) -> Result<RocketConfig, RocketConfigError>Create rocket configuration based on the environment
variable. Defaults to dev mode if FXA_EMAIL_ENV is not set.
Trait Implementations
impl Default for Settings[src]
impl Default for Settingsimpl Debug for Settings[src]
impl Debug for Settingsimpl Serialize for Settings[src]
impl Serialize for Settingsfn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, impl<'de> Deserialize<'de> for Settings[src]
impl<'de> Deserialize<'de> for Settingsfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, impl Value for Settings[src]
impl Value for SettingsAuto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, impl<T> Same for T
impl<T> Same for Ttype Output = T
Should always be Self
impl<T> Typeable for T where
T: Any,
impl<T> Typeable for T where
T: Any, impl<T> Configure for T where
T: ?Sized, [src]
impl<T> Configure for T where
T: ?Sized, fn readable(self) -> Readable<Self>[src]
fn readable(self) -> Readable<Self>Marks self as using is_human_readable == true
fn compact(self) -> Compact<Self>[src]
fn compact(self) -> Compact<Self>Marks self as using is_human_readable == false
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized, impl<T> Serialize for T where
T: Serialize + ?Sized, [src]
impl<T> Serialize for T where
T: Serialize + ?Sized, fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>[src]
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>