Struct macroific::attr_parse::ParseWrapper
source · pub struct ParseWrapper<T>(/* private fields */);
Available on crate feature
attr_parse
only.Expand description
A wrapper to make any ParseOption
into a Parse
.
Implementations§
source§impl<T> ParseWrapper<T>
impl<T> ParseWrapper<T>
pub const fn new(inner: T) -> ParseWrapper<T>
sourcepub fn parse_self(input: &ParseBuffer<'_>) -> Result<T, Error>where
T: ParseOption,
pub fn parse_self(input: &ParseBuffer<'_>) -> Result<T, Error>where T: ParseOption,
sourcepub fn parse_stream_self(input: TokenStream) -> Result<T, Error>where
T: ParseOption,
pub fn parse_stream_self(input: TokenStream) -> Result<T, Error>where T: ParseOption,
parse_self
that accepts a proc_macro2::TokenStream
.
Trait Implementations§
source§impl<T> Clone for ParseWrapper<T>where
T: Clone,
impl<T> Clone for ParseWrapper<T>where T: Clone,
source§fn clone(&self) -> ParseWrapper<T>
fn clone(&self) -> ParseWrapper<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Debug for ParseWrapper<T>where
T: Debug,
impl<T> Debug for ParseWrapper<T>where T: Debug,
source§impl<T> Hash for ParseWrapper<T>where
T: Hash,
impl<T> Hash for ParseWrapper<T>where T: Hash,
source§impl<T> Ord for ParseWrapper<T>where
T: Ord,
impl<T> Ord for ParseWrapper<T>where T: Ord,
source§fn cmp(&self, other: &ParseWrapper<T>) -> Ordering
fn cmp(&self, other: &ParseWrapper<T>) -> Ordering
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> Parse for ParseWrapper<T>where
T: ParseOption,
impl<T> Parse for ParseWrapper<T>where T: ParseOption,
fn parse(input: &ParseBuffer<'_>) -> Result<ParseWrapper<T>, Error>
source§impl<T> PartialEq for ParseWrapper<T>where
T: PartialEq,
impl<T> PartialEq for ParseWrapper<T>where T: PartialEq,
source§fn eq(&self, other: &ParseWrapper<T>) -> bool
fn eq(&self, other: &ParseWrapper<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> PartialOrd for ParseWrapper<T>where
T: PartialOrd,
impl<T> PartialOrd for ParseWrapper<T>where T: PartialOrd,
source§fn partial_cmp(&self, other: &ParseWrapper<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &ParseWrapper<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T> Eq for ParseWrapper<T>where T: Eq,
impl<T> StructuralEq for ParseWrapper<T>
impl<T> StructuralPartialEq for ParseWrapper<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for ParseWrapper<T>where T: RefUnwindSafe,
impl<T> Send for ParseWrapper<T>where T: Send,
impl<T> Sync for ParseWrapper<T>where T: Sync,
impl<T> Unpin for ParseWrapper<T>where T: Unpin,
impl<T> UnwindSafe for ParseWrapper<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