pub struct Span { /* private fields */ }Implementations§
source§impl Span
impl Span
pub fn new( location: impl Into<Location>, module_name: impl Into<String>, ) -> Self
pub fn new_with_end( location: impl Into<Location>, end_location: impl Into<Location>, module_name: impl Into<String>, ) -> Self
pub fn combine(start: &Span, end: &Span) -> Self
pub fn get_length(&self) -> usize
pub fn add_snippet(self, snippet: impl Into<String>) -> Self
pub fn set_snippet(self, snippet: Option<String>) -> Self
pub fn get_snippet(&self) -> &Option<String>
pub fn set_end(&mut self, location: Location)
pub fn get_start(&self) -> Location
pub fn get_end(&self) -> Location
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
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)