Struct seaplane_cli::context::restrict::RestrictCtx
source · [−]pub struct RestrictCtx {
pub api: Option<String>,
pub directory: Option<RestrictedDirectory>,
pub from_api: Option<String>,
pub from_dir: Option<String>,
pub providers_allowed: HashSet<ProviderModel>,
pub providers_denied: HashSet<ProviderModel>,
pub regions_allowed: HashSet<RegionModel>,
pub regions_denied: HashSet<RegionModel>,
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
api: Option<String>directory: Option<RestrictedDirectory>A base64 encoded directory
from_api: Option<String>from_dir: Option<String>A base64 encoded key
providers_allowed: HashSet<ProviderModel>Use actual API model since that is ultimately what we want
providers_denied: HashSet<ProviderModel>Use actual API model since that is ultimately what we want
regions_allowed: HashSet<RegionModel>Use actual API model since that is ultimately what we want
regions_denied: HashSet<RegionModel>Use actual API model since that is ultimately what we want
base64: boolIs the directory already URL safe base64 encoded
decode: boolPrint with decoding
no_header: boolSkip the headers in –format=table
Implementations
sourceimpl RestrictCtx
impl RestrictCtx
sourcepub fn from_restrict_common(
matches: &SeaplaneRestrictCommonArgMatches<'_>
) -> Result<RestrictCtx>
pub fn from_restrict_common(
matches: &SeaplaneRestrictCommonArgMatches<'_>
) -> Result<RestrictCtx>
Builds a RestictCtx from ArgMatches
sourcepub fn from_restrict_list(
matches: &SeaplaneRestrictListArgMatches<'_>
) -> Result<RestrictCtx>
pub fn from_restrict_list(
matches: &SeaplaneRestrictListArgMatches<'_>
) -> Result<RestrictCtx>
Builds a RestictCtx from ArgMatches
sourcepub fn from_restrict_set(
matches: &SeaplaneRestrictSetArgMatches<'_>
) -> Result<RestrictCtx>
pub fn from_restrict_set(
matches: &SeaplaneRestrictSetArgMatches<'_>
) -> Result<RestrictCtx>
Builds a RestictCtx from ArgMatches
pub fn restriction_details(&self) -> Result<RestrictionDetails>
Trait Implementations
sourceimpl Clone for RestrictCtx
impl Clone for RestrictCtx
sourcefn clone(&self) -> RestrictCtx
fn clone(&self) -> RestrictCtx
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 RestrictCtx
impl Debug for RestrictCtx
sourceimpl Default for RestrictCtx
impl Default for RestrictCtx
sourcefn default() -> RestrictCtx
fn default() -> RestrictCtx
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for RestrictCtx
impl Send for RestrictCtx
impl Sync for RestrictCtx
impl Unpin for RestrictCtx
impl UnwindSafe for RestrictCtx
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