UpdateFromXvcConfig

Trait UpdateFromXvcConfig 

Source
pub trait UpdateFromXvcConfig {
    // Required method
    fn update_from_conf(self, conf: &XvcConfig) -> Result<Box<Self>, Error>;
}
Expand description

Trait to update CLI options with defaults from configuration.

When a CLI struct like [xvc_pipeline::PipelineCLI] implements this trait, it reads the configuration and updates values not set in the command line accordingly.

Required Methods§

Source

fn update_from_conf(self, conf: &XvcConfig) -> Result<Box<Self>, Error>

Update the implementing struct from the configuration. Reading the relevant keys and values of the config is in implementor’s responsibility.

This is used to abstract away CLI structs and crate options.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§