Struct wick_config::ComponentConfiguration
source · pub struct ComponentConfiguration { /* private fields */ }Expand description
The internal representation of a Wick manifest.
Implementations§
source§impl ComponentConfiguration
impl ComponentConfiguration
sourcepub fn load_from_file(
path: impl AsRef<Path>
) -> Result<ComponentConfiguration, Error>
pub fn load_from_file( path: impl AsRef<Path> ) -> Result<ComponentConfiguration, Error>
Load struct from file by trying all the supported file formats.
sourcepub fn load_from_bytes(
source: Option<String>,
bytes: &[u8]
) -> Result<ComponentConfiguration, Error>
pub fn load_from_bytes( source: Option<String>, bytes: &[u8] ) -> Result<ComponentConfiguration, Error>
Load struct from bytes by attempting to parse all the supported file formats.
sourcepub fn host(&self) -> &HostConfig
pub fn host(&self) -> &HostConfig
Determine if the configuration allows for fetching artifacts with the :latest tag.
sourcepub fn host_mut(&mut self) -> &mut HostConfig
pub fn host_mut(&mut self) -> &mut HostConfig
Determine if the configuration allows for fetching artifacts with the :latest tag.
sourcepub fn allow_latest(&self) -> bool
pub fn allow_latest(&self) -> bool
Determine if the configuration allows for fetching artifacts with the :latest tag.
sourcepub fn insecure_registries(&self) -> &Vec<String> ⓘ
pub fn insecure_registries(&self) -> &Vec<String> ⓘ
Return the list of insecure registries defined in the manifest
sourcepub fn operations(&self) -> &HashMap<String, FlowOperation>
pub fn operations(&self) -> &HashMap<String, FlowOperation>
Get a map of [Flow]s from the ComponentConfiguration
sourcepub fn types(&self) -> &[TypeDefinition]
pub fn types(&self) -> &[TypeDefinition]
Get the name for this manifest.
sourcepub fn components(&self) -> &HashMap<String, ComponentDefinition>
pub fn components(&self) -> &HashMap<String, ComponentDefinition>
Get the name for this manifest.
sourcepub fn component(&self, namespace: &str) -> Option<&ComponentDefinition>
pub fn component(&self, namespace: &str) -> Option<&ComponentDefinition>
Get the name for this manifest.
sourcepub fn flow(&self, name: &str) -> Option<&FlowOperation>
pub fn flow(&self, name: &str) -> Option<&FlowOperation>
Get a schematic by name
Trait Implementations§
source§impl Clone for ComponentConfiguration
impl Clone for ComponentConfiguration
source§fn clone(&self) -> ComponentConfiguration
fn clone(&self) -> ComponentConfiguration
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 ComponentConfiguration
impl Debug for ComponentConfiguration
source§impl Default for ComponentConfiguration
impl Default for ComponentConfiguration
source§fn default() -> ComponentConfiguration
fn default() -> ComponentConfiguration
Returns the “default value” for a type. Read more
source§impl TryFrom<ComponentConfiguration> for ComponentConfiguration
impl TryFrom<ComponentConfiguration> for ComponentConfiguration
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
source§impl TryFrom<HostManifest> for ComponentConfiguration
impl TryFrom<HostManifest> for ComponentConfiguration
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.