pub struct Layer {
pub extends: Vec<String>,
pub providers: ProvidersConfig,
pub routes: Vec<Route>,
pub storage: Option<StorageConfig>,
}Expand description
One file of a layered config: what it sets itself, plus the files
it builds on. Config::from_layers merges a chain of these.
Fields§
§extends: Vec<String>Parent files, as URLs or paths relative to this file. Each parent is merged in before this file, so this file wins.
providers: ProvidersConfig§routes: Vec<Route>§storage: Option<StorageConfig>Implementations§
Source§impl Layer
impl Layer
Sourcepub fn from_yaml_str(text: &str) -> Result<Self, SignalError>
pub fn from_yaml_str(text: &str) -> Result<Self, SignalError>
Parses one file, interpolating ${VAR} placeholders. Routes are
checked only once the whole chain is merged, since a team file
may route to a provider its parent configures.
A ${store:...} secret placeholder is an error here, since it
needs a network read; configs loaded through a client resolve
them first (see crate::secrets).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Layer
impl<'de> Deserialize<'de> for Layer
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
Auto Trait Implementations§
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
impl UnwindSafe for Layer
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