pub struct Surrounded<'source, P, T>where
P: Pair,{
pub open: P::Open<'source>,
pub value: T,
pub close: P::Close<'source>,
/* private fields */
}Expand description
Represents a value that is surrounded by two tokens.
Fields§
§open: P::Open<'source>The opening token that was parsed.
value: TThe value.
close: P::Close<'source>The closing token that was parsed.
Trait Implementations§
Source§impl<'source, P, T: Clone> Clone for Surrounded<'source, P, T>
impl<'source, P, T: Clone> Clone for Surrounded<'source, P, T>
Source§fn clone(&self) -> Surrounded<'source, P, T>
fn clone(&self) -> Surrounded<'source, P, T>
Returns a duplicate 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<'source, P, T: Debug> Debug for Surrounded<'source, P, T>
impl<'source, P, T: Debug> Debug for Surrounded<'source, P, T>
Source§impl<'source, P, T> Parse<'source> for Surrounded<'source, P, T>
impl<'source, P, T> Parse<'source> for Surrounded<'source, P, T>
Source§impl<'source, P, T: PartialEq> PartialEq for Surrounded<'source, P, T>
impl<'source, P, T: PartialEq> PartialEq for Surrounded<'source, P, T>
impl<'source, P, T: Eq> Eq for Surrounded<'source, P, T>
impl<'source, P, T> StructuralPartialEq for Surrounded<'source, P, T>where
P: Pair,
Auto Trait Implementations§
impl<'source, P, T> Freeze for Surrounded<'source, P, T>
impl<'source, P, T> RefUnwindSafe for Surrounded<'source, P, T>where
<P as Pair>::Open<'source>: RefUnwindSafe,
T: RefUnwindSafe,
<P as Pair>::Close<'source>: RefUnwindSafe,
P: RefUnwindSafe,
impl<'source, P, T> Send for Surrounded<'source, P, T>
impl<'source, P, T> Sync for Surrounded<'source, P, T>
impl<'source, P, T> Unpin for Surrounded<'source, P, T>
impl<'source, P, T> UnwindSafe for Surrounded<'source, P, T>where
<P as Pair>::Open<'source>: UnwindSafe,
T: UnwindSafe,
<P as Pair>::Close<'source>: UnwindSafe,
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