pub struct NoTrim<T>(pub T);Expand description
Broadly disables the default whitespace trimming on the inner type.
Types with custom trimming rules (e.g. number types) are not effected.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'s, T> Inpt<'s> for NoTrim<T>where
Self: 's,
T: Inpt<'s>,
impl<'s, T> Inpt<'s> for NoTrim<T>where
Self: 's,
T: Inpt<'s>,
Source§fn step(
text: &'s str,
end: bool,
trimmed: CharClass,
guard: &mut RecursionGuard,
) -> InptStep<'s, Self>
fn step( text: &'s str, end: bool, trimmed: CharClass, guard: &mut RecursionGuard, ) -> InptStep<'s, Self>
Consume a token of this type from the given text if possible, returning an error if not.
If
end is false, all remaining text should also be returned. Otherwise the text should be
consumed entirely. All text must be trimmed with the given CharClass (typically but not
always returned from Inpt::default_trim) before being passed to this function. Read moreSource§fn default_trim(_inherited: CharClass) -> CharClass
fn default_trim(_inherited: CharClass) -> CharClass
Determine the class of characters which this type would like trimmed off of any text before parsing.
This is inherited from the parent type if not otherwise defined.
impl<T: Copy> Copy for NoTrim<T>
Auto Trait Implementations§
impl<T> Freeze for NoTrim<T>where
T: Freeze,
impl<T> RefUnwindSafe for NoTrim<T>where
T: RefUnwindSafe,
impl<T> Send for NoTrim<T>where
T: Send,
impl<T> Sync for NoTrim<T>where
T: Sync,
impl<T> Unpin for NoTrim<T>where
T: Unpin,
impl<T> UnwindSafe for NoTrim<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