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: KeyValuesdirectory: 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
sourceimpl 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
sourceimpl Clone for MetadataCtx
impl Clone for MetadataCtx
sourcefn clone(&self) -> MetadataCtx
fn clone(&self) -> MetadataCtx
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for MetadataCtx
impl Debug for MetadataCtx
sourceimpl Default for MetadataCtx
impl Default for MetadataCtx
sourcefn default() -> MetadataCtx
fn default() -> MetadataCtx
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for MetadataCtx
impl Send for MetadataCtx
impl Sync for MetadataCtx
impl Unpin for MetadataCtx
impl UnwindSafe for MetadataCtx
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more