pub struct Settings {
pub setup: Setup,
pub registry: Registry,
pub docs: Docs,
pub proxy: Proxy,
pub log: Log,
pub local: Local,
pub origin: Origin,
pub postgresql: Postgresql,
pub s3: S3,
pub gcs: Gcs,
pub oauth2: OAuth2,
pub toolchain: Toolchain,
}Expand description
Pure configuration values, every leaf carries the active value, no
provenance attached. Provenance lives on the companion SettingsProv,
which is built by build_prov_with_cli and stored in the app state for
the one handler (/settings) that needs it.
Fields§
§setup: Setup§registry: Registry§docs: Docs§proxy: Proxy§log: Log§local: Local§origin: Origin§postgresql: Postgresql§s3: S3§gcs: Gcs§oauth2: OAuth2§toolchain: ToolchainImplementations§
Source§impl Settings
impl Settings
pub fn bin_path(&self) -> PathBuf
pub fn doc_queue_path(&self) -> PathBuf
pub fn sqlite_path(&self) -> PathBuf
pub fn docs_path(&self) -> String
pub fn base_path(&self) -> PathBuf
pub fn crates_io_bin_path(&self) -> PathBuf
pub fn crates_io_path(&self) -> String
pub fn crates_path(&self) -> String
pub fn crates_path_or_bucket(&self) -> String
pub fn crates_io_path_or_bucket(&self) -> String
pub fn toolchain_path(&self) -> String
pub fn toolchain_path_or_bucket(&self) -> String
Sourcepub fn docs_backend_is_local(&self) -> bool
pub fn docs_backend_is_local(&self) -> bool
false once an operator has opted into s3.docs_bucket/gcs.docs_bucket
(see init_docs_storage) — unlike the other *_path_or_bucket methods,
docs stay on local disk by default even when s3.enabled/gcs.enabled
is set, so this can’t be derived from enabled alone.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Settings
Source§impl From<&Settings> for SettingsPartial
impl From<&Settings> for SettingsPartial
Source§impl From<&SettingsProv> for Settings
impl From<&SettingsProv> for Settings
Source§fn from(prov: &SettingsProv) -> Self
fn from(prov: &SettingsProv) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more