Struct source_cache::SourceLine
source · pub struct SourceLine {
pub offset: u32,
pub length: u32,
pub text: String,
}
Expand description
A type representing a single line of a SourceText
.
Fields§
§offset: u32
Get the offset of this line in the original SourceText
(i.e: the number of characters that precede it).
length: u32
Get the character length of this line.
text: String
Get the view of this line in the original SourceText
.
Implementations§
Trait Implementations§
source§impl Clone for SourceLine
impl Clone for SourceLine
source§fn clone(&self) -> SourceLine
fn clone(&self) -> SourceLine
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 Debug for SourceLine
impl Debug for SourceLine
source§impl Hash for SourceLine
impl Hash for SourceLine
source§impl PartialEq for SourceLine
impl PartialEq for SourceLine
source§fn eq(&self, other: &SourceLine) -> bool
fn eq(&self, other: &SourceLine) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SourceLine
impl StructuralPartialEq for SourceLine
Auto Trait Implementations§
impl RefUnwindSafe for SourceLine
impl Send for SourceLine
impl Sync for SourceLine
impl Unpin for SourceLine
impl UnwindSafe for SourceLine
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