pub struct Preset<T>(pub T);Expand description
Simple indicator for a flag which definitely contains a value.
Tuple Fields§
§0: TImplementations§
Source§impl<T> Preset<T>
impl<T> Preset<T>
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<T: FromStr> Flaggable for Preset<T>
impl<T: FromStr> Flaggable for Preset<T>
Source§fn parse_from(&mut self, s: &str) -> Result<(), String>
fn parse_from(&mut self, s: &str) -> Result<(), String>
Parses a string into this flag.
The string is value subsequently after the flag
Source§fn expects_value(&self) -> bool
fn expects_value(&self) -> bool
Whether or not this flag expects a value.
In the case this is overriden, the parse_from method should ignore the input value.
Auto Trait Implementations§
impl<T> Freeze for Preset<T>where
T: Freeze,
impl<T> RefUnwindSafe for Preset<T>where
T: RefUnwindSafe,
impl<T> Send for Preset<T>where
T: Send,
impl<T> Sync for Preset<T>where
T: Sync,
impl<T> Unpin for Preset<T>where
T: Unpin,
impl<T> UnwindSafe for Preset<T>where
T: UnwindSafe,
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