pub struct ParseWrapper<P: Parse>(/* private fields */);Expand description
A wrapper around syn’s Parse trait that implements Deserialize in
the context of from_tokenstream.
This extends TokenStreamWrapper by further interpreting the TokenStream
and guiding the user in the case of parse errors.
§Panics
The Deserialize implementation for TokenStreamWrapper will panic if
it is not used in the context of from_tokenstream.
Implementations§
Source§impl<P: Parse> ParseWrapper<P>
impl<P: Parse> ParseWrapper<P>
pub fn into_inner(self) -> P
Trait Implementations§
Source§impl<P: Parse> Deref for ParseWrapper<P>
impl<P: Parse> Deref for ParseWrapper<P>
Source§impl<'de, P: Parse> Deserialize<'de> for ParseWrapper<P>
impl<'de, P: Parse> Deserialize<'de> for ParseWrapper<P>
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
impl<P: Eq + Parse> Eq for ParseWrapper<P>
impl<P: Parse> StructuralPartialEq for ParseWrapper<P>
Auto Trait Implementations§
impl<P> Freeze for ParseWrapper<P>where
P: Freeze,
impl<P> RefUnwindSafe for ParseWrapper<P>where
P: RefUnwindSafe,
impl<P> Send for ParseWrapper<P>where
P: Send,
impl<P> Sync for ParseWrapper<P>where
P: Sync,
impl<P> Unpin for ParseWrapper<P>where
P: Unpin,
impl<P> UnsafeUnpin for ParseWrapper<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for ParseWrapper<P>where
P: 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