Struct config_encoder::ConfigField
source · pub struct ConfigField {
pub key: String,
pub value: Value,
}
Expand description
A single resolved configuration field.
Fields§
§key: String
The configuration field’s key.
value: Value
The configuration field’s value.
Implementations§
source§impl ConfigField
impl ConfigField
sourcepub fn resolve(
spec_field: ValueSpec,
decl_field: &ConfigFieldDecl
) -> Result<Self, ValueError>
pub fn resolve( spec_field: ValueSpec, 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<ConfigField> for ConfigField
impl PartialEq<ConfigField> 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 ==
.