pub enum ArgPolicy {
Any,
Exact {
values: Vec<String>,
},
Prefix {
values: Vec<String>,
},
}Expand description
How args are validated against a profile. Applied per argv element.
Variants§
Any
Every element accepted (explicit opt-in; operator-curated).
Exact
Every element must string-equal one of values.
Prefix
Every element must byte-start-with one of values.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ArgPolicy
impl<'de> Deserialize<'de> for ArgPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ArgPolicy
impl RefUnwindSafe for ArgPolicy
impl Send for ArgPolicy
impl Sync for ArgPolicy
impl Unpin for ArgPolicy
impl UnsafeUnpin for ArgPolicy
impl UnwindSafe for ArgPolicy
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