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 duplicate 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
Auto Trait Implementations§
impl Freeze for MetadataCtx
impl RefUnwindSafe for MetadataCtx
impl Send for MetadataCtx
impl Sync for MetadataCtx
impl Unpin for MetadataCtx
impl UnwindSafe for MetadataCtx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more