pub enum Optional<T: Parsable> {
Some(T),
None,
}Variants§
Implementations§
Trait Implementations§
Source§impl<T: Ord + Parsable> Ord for Optional<T>
impl<T: Ord + Parsable> Ord for Optional<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: Parsable> Parsable for Optional<T>
impl<T: Parsable> Parsable for Optional<T>
Source§fn parse(stream: &mut ParseStream) -> Result<Self>
fn parse(stream: &mut ParseStream) -> Result<Self>
Attempts to parse the specified string into a value of type
T.Source§fn parse_value(value: Self, stream: &mut ParseStream) -> Result<Self>
fn parse_value(value: Self, stream: &mut ParseStream) -> Result<Self>
Attempts to parse a specific value of type
T from the ParseStream.Source§impl<T: PartialOrd + Parsable> PartialOrd for Optional<T>
impl<T: PartialOrd + Parsable> PartialOrd for Optional<T>
impl<T: Copy + Parsable> Copy for Optional<T>
impl<T: Eq + Parsable> Eq for Optional<T>
impl<T: Parsable> StructuralPartialEq for Optional<T>
Auto Trait Implementations§
impl<T> Freeze for Optional<T>where
T: Freeze,
impl<T> RefUnwindSafe for Optional<T>where
T: RefUnwindSafe,
impl<T> Send for Optional<T>where
T: Send,
impl<T> Sync for Optional<T>where
T: Sync,
impl<T> Unpin for Optional<T>where
T: Unpin,
impl<T> UnwindSafe for Optional<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Peekable for Twhere
T: Parsable,
impl<T> Peekable for Twhere
T: Parsable,
Source§fn peek(stream: &ParseStream) -> bool
fn peek(stream: &ParseStream) -> bool
Returns a boolean indicating whether the
ParseStream can parse the specified type
at the current parsing position.Source§fn peek_value(value: T, stream: &ParseStream) -> bool
fn peek_value(value: T, stream: &ParseStream) -> bool
Returns a boolean indicating whether the
ParseStream can parse the specified value
at the current parsing position.