pub struct Span(usize);
Tuple Fields§
§0: usize
Implementations§
Source§impl Span
impl Span
Sourcepub fn get_filename(&self) -> Filename
pub fn get_filename(&self) -> Filename
Return filename for diagnostic purposes
Sourcepub fn diagnostic(&self) -> String
pub fn diagnostic(&self) -> String
Return the span location to be printed in diagnostic messages.
This may leak local file paths and should not be used to build artifacts that may be distributed.
Trait Implementations§
Source§impl IndexedVal for Span
impl IndexedVal for Span
impl Copy for Span
impl Eq for Span
impl StructuralPartialEq for Span
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,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes