Struct shrimple_parser::utils::WithSourceLine
source · pub struct WithSourceLine<T>(pub T);Expand description
A wrapper for FullLocation & crate::FullParsingError that will change their Display
implementations to get the source line from the filesystem and print it in a Rust-like format.
Tuple Fields§
§0: TTrait Implementations§
source§impl<T: Clone> Clone for WithSourceLine<T>
impl<T: Clone> Clone for WithSourceLine<T>
source§fn clone(&self) -> WithSourceLine<T>
fn clone(&self) -> WithSourceLine<T>
Returns a copy 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<T: Debug> Debug for WithSourceLine<T>
impl<T: Debug> Debug for WithSourceLine<T>
source§impl Display for WithSourceLine<FullLocation<'_>>
impl Display for WithSourceLine<FullLocation<'_>>
source§impl<Reason: Display> Display for WithSourceLine<FullParsingError<'_, Reason>>
impl<Reason: Display> Display for WithSourceLine<FullParsingError<'_, Reason>>
source§impl<T: PartialEq> PartialEq for WithSourceLine<T>
impl<T: PartialEq> PartialEq for WithSourceLine<T>
source§fn eq(&self, other: &WithSourceLine<T>) -> bool
fn eq(&self, other: &WithSourceLine<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<T: Copy> Copy for WithSourceLine<T>
impl<T: Eq> Eq for WithSourceLine<T>
impl<T> StructuralPartialEq for WithSourceLine<T>
Auto Trait Implementations§
impl<T> Freeze for WithSourceLine<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithSourceLine<T>where
T: RefUnwindSafe,
impl<T> Send for WithSourceLine<T>where
T: Send,
impl<T> Sync for WithSourceLine<T>where
T: Sync,
impl<T> Unpin for WithSourceLine<T>where
T: Unpin,
impl<T> UnwindSafe for WithSourceLine<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