[−][src]Struct flood_tide::Opt
Record type of opt ary table
Examples
#[cfg(feature = "option_argument")] { use flood_tide::Arg; use flood_tide::Lex; use flood_tide::Opt; use flood_tide::OptNum; #[rustfmt::skip] #[repr(u8)] #[derive(Debug, PartialEq)] enum CmdOP { A = 1, Barn, Eat, }; impl CmdOP { pub const fn to(self) -> OptNum { self as OptNum } } #[rustfmt::skip] const OPT_ARY: [Opt;3] = [ Opt { sho: b'a', lon: "", has: Arg::No, num: CmdOP::A.to(), }, Opt { sho: b'b', lon: "barn", has: Arg::No, num: CmdOP::Barn.to(), }, Opt { sho: 0u8, lon: "eat", has: Arg::Yes, num: CmdOP::Eat.to(), }, ]; }
Fields
sho: u8
short name
lon: &'a str
long name
has: Arg
has arg / option argument
num: OptNum
uniq number
Trait Implementations
impl<'a> Clone for Opt<'a>
[src]
impl<'a> Copy for Opt<'a>
[src]
impl<'a> Debug for Opt<'a>
[src]
impl<'a> PartialEq<Opt<'a>> for Opt<'a>
[src]
impl<'a> StructuralPartialEq for Opt<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Opt<'a>
[src]
impl<'a> Send for Opt<'a>
[src]
impl<'a> Sync for Opt<'a>
[src]
impl<'a> Unpin for Opt<'a>
[src]
impl<'a> UnwindSafe for Opt<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,