Struct seaplane_cli::context::metadata::MetadataCtx
source · pub struct MetadataCtx {
pub kvs: KeyValues,
pub directory: Option<Directory>,
pub base64: bool,
pub decode: bool,
pub decode_safe: bool,
pub no_decode: bool,
pub from: Option<Key>,
pub no_header: bool,
pub no_keys: bool,
pub no_values: bool,
pub keys_width_limit: usize,
pub values_width_limit: usize,
}Expand description
Represents the “Source of Truth” i.e. it combines all the CLI options, ENV vars, and config values into a single structure that can be used later to build models for the API or local structs for serializing
Fields§
§kvs: KeyValues§directory: Option<Directory>§base64: boolIs the key or value already URL safe base64 encoded
decode: boolPrint with decoding
decode_safe: boolPrint with safe decoding
no_decode: boolPrint with no decoding
from: Option<Key>A base64 encoded key
no_header: boolSkip the KEY or VALUE header in –format=table
no_keys: boolDon’t print keys
no_values: boolDon’t print values
keys_width_limit: usizeMax width of keys
values_width_limit: usizeMax width of values
Implementations§
source§impl MetadataCtx
impl MetadataCtx
sourcepub fn from_md_common(
matches: &SeaplaneMetadataCommonArgMatches<'_>
) -> Result<MetadataCtx>
pub fn from_md_common( matches: &SeaplaneMetadataCommonArgMatches<'_> ) -> Result<MetadataCtx>
Builds a MetadataCtx from ArgMatches
sourcepub fn from_md_set(
matches: &SeaplaneMetadataSetArgMatches<'_>
) -> Result<MetadataCtx>
pub fn from_md_set( matches: &SeaplaneMetadataSetArgMatches<'_> ) -> Result<MetadataCtx>
Builds a MetadataCtx from ArgMatches
Trait Implementations§
source§impl Clone for MetadataCtx
impl Clone for MetadataCtx
source§fn clone(&self) -> MetadataCtx
fn clone(&self) -> MetadataCtx
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 MetadataCtx
impl Debug for MetadataCtx
source§impl Default for MetadataCtx
impl Default for MetadataCtx
source§fn default() -> MetadataCtx
fn default() -> MetadataCtx
Returns the “default value” for a type. Read more