Struct seaplane_cli::context::locks::LocksCtx
source · pub struct LocksCtx {
pub lock_name: Option<LockName>,
pub ttl: Option<u32>,
pub client_id: Option<String>,
pub lock_id: Option<LockId>,
pub base64: bool,
pub decode: bool,
pub no_header: bool,
}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
lock_name: Option<LockName>ttl: Option<u32>client_id: Option<String>lock_id: Option<LockId>base64: boolIs the lock-name already URL safe base64 encoded
decode: boolPrint with decoding
no_header: boolSkip the KEY or VALUE header in –format=table
Implementations
sourceimpl LocksCtx
impl LocksCtx
sourcepub fn from_locks_common(
matches: &SeaplaneLocksCommonArgMatches<'_>
) -> Result<LocksCtx>
pub fn from_locks_common(
matches: &SeaplaneLocksCommonArgMatches<'_>
) -> Result<LocksCtx>
Builds a LocksCtx from ArgMatches
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LocksCtx
impl Send for LocksCtx
impl Sync for LocksCtx
impl Unpin for LocksCtx
impl UnwindSafe for LocksCtx
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