Struct config_encoder::ConfigField
source · pub struct ConfigField {
pub key: String,
pub value: ConfigValue,
pub mutability: ConfigMutability,
}
Expand description
A single resolved configuration field.
Fields§
§key: String
The configuration field’s key.
value: ConfigValue
The configuration field’s value.
mutability: ConfigMutability
Ways this component’s packaged values could have been overridden.
Implementations§
source§impl ConfigField
impl ConfigField
sourcepub fn resolve(
value: ConfigValue,
decl_field: &ConfigFieldDecl
) -> Result<Self, ValueError>
pub fn resolve( value: ConfigValue, decl_field: &ConfigFieldDecl ) -> Result<Self, ValueError>
Reconciles a config field schema from the manifest with a value from the value file. If the types and constraints don’t match, an error is returned.
Trait Implementations§
source§impl Clone for ConfigField
impl Clone for ConfigField
source§fn clone(&self) -> ConfigField
fn clone(&self) -> ConfigField
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConfigField
impl Debug for ConfigField
source§impl Into<ResolvedConfigField> for ConfigField
impl Into<ResolvedConfigField> for ConfigField
source§fn into(self) -> ResolvedConfigField
fn into(self) -> ResolvedConfigField
Converts this type into the (usually inferred) input type.
source§impl PartialEq for ConfigField
impl PartialEq for ConfigField
source§fn eq(&self, other: &ConfigField) -> bool
fn eq(&self, other: &ConfigField) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ConfigField
Auto Trait Implementations§
impl Freeze for ConfigField
impl RefUnwindSafe for ConfigField
impl Send for ConfigField
impl Sync for ConfigField
impl Unpin for ConfigField
impl UnwindSafe for ConfigField
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