pub struct Span<'input, T: 'input + ?Sized, O> {
pub span: Range<usize>,
pub source: &'input T,
pub output: O,
}
Expand description
Struct returned by Rule::spanned
to store the span and source of a given parsed rule.
Fields§
§span: Range<usize>
The range of the input that the rule parsed over.
source: &'input T
The original input that the rule parsed.
output: O
The output of the rule’s parsing.
Trait Implementations§
impl<'input, T: Eq + 'input + ?Sized, O: Eq> Eq for Span<'input, T, O>
impl<'input, T: 'input + ?Sized, O> StructuralPartialEq for Span<'input, T, O>
Auto Trait Implementations§
impl<'input, T, O> Freeze for Span<'input, T, O>
impl<'input, T, O> RefUnwindSafe for Span<'input, T, O>
impl<'input, T, O> Send for Span<'input, T, O>
impl<'input, T, O> Sync for Span<'input, T, O>
impl<'input, T, O> Unpin for Span<'input, T, O>
impl<'input, T, O> UnwindSafe for Span<'input, T, O>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)