pub enum Piece<'a> {
Text(&'a str),
Brace(char),
Inline {
raw: &'a str,
body: &'a str,
},
Group {
raw: &'a str,
body: &'a str,
},
}Expand description
One piece of an op field’s text. See the module documentation for the rules that divide a text into pieces.
Variants§
Text(&'a str)
Text that holds no escape and no bind point.
Brace(char)
\{ or \}: the brace it stands for.
Inline
{{ … }}: the whole of it as written, and its trimmed body.
Group
{ … }: the whole of it as written, and its trimmed body.
Implementations§
Trait Implementations§
impl<'a> Copy for Piece<'a>
impl<'a> Eq for Piece<'a>
impl<'a> StructuralPartialEq for Piece<'a>
Auto Trait Implementations§
impl<'a> Forget for Piece<'a>
impl<'a> Freeze for Piece<'a>
impl<'a> Move for Piece<'a>
impl<'a> RefUnwindSafe for Piece<'a>
impl<'a> Send for Piece<'a>
impl<'a> Sync for Piece<'a>
impl<'a> Unpin for Piece<'a>
impl<'a> UnsafeUnpin for Piece<'a>where
&'a str: UnsafeUnpin,
impl<'a> UnwindSafe for Piece<'a>where
&'a str: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.