pub struct Bracketed<T> {
pub opening_bracket: Token,
pub item: T,
pub closing_bracket: Token,
}Expand description
An item that must be surrounded by brackets.
Fields§
§opening_bracket: TokenThe opening bracket.
item: TThe actual item
closing_bracket: TokenThe closing bracket.
Trait Implementations§
Source§impl<T: Ord> Ord for Bracketed<T>
impl<T: Ord> Ord for Bracketed<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<A, T> ParseWithArgs<(&str, Symbol, A)> for Bracketed<T>where
T: ParseWithArgs<A> + Default,
impl<A, T> ParseWithArgs<(&str, Symbol, A)> for Bracketed<T>where
T: ParseWithArgs<A> + Default,
Source§impl<T: PartialOrd> PartialOrd for Bracketed<T>
impl<T: PartialOrd> PartialOrd for Bracketed<T>
Source§impl<T: Print> Print for Bracketed<T>
impl<T: Print> Print for Bracketed<T>
Source§fn print_final_trivia(&self) -> String
fn print_final_trivia(&self) -> String
Prints only the very final trivia. Used for the default implementation of
Print::print, which just joins Print::print_without_final_trivia
and this function.Source§fn print_without_final_trivia(&self) -> String
fn print_without_final_trivia(&self) -> String
Prints the whole token including all surrounding trivia, excluding the
very last trailing trivia.
impl<T: Eq> Eq for Bracketed<T>
impl<T> StructuralPartialEq for Bracketed<T>
Auto Trait Implementations§
impl<T> Freeze for Bracketed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Bracketed<T>where
T: RefUnwindSafe,
impl<T> Send for Bracketed<T>where
T: Send,
impl<T> Sync for Bracketed<T>where
T: Sync,
impl<T> Unpin for Bracketed<T>where
T: Unpin,
impl<T> UnwindSafe for Bracketed<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