pub struct Span {
pub file_id: u32,
pub byte_offset: u32,
pub byte_length: u32,
}Fields§
§file_id: u32§byte_offset: u32§byte_length: u32Implementations§
Source§impl Span
impl Span
pub fn new(file_id: u32, byte_offset: u32, byte_length: u32) -> Self
pub fn dummy() -> Self
pub fn is_dummy(&self) -> bool
pub fn end(&self) -> u32
pub fn contains(&self, inner: &Span) -> bool
pub fn merge(self, other: Span) -> Span
pub fn after(self, prefix: Span) -> Span
pub fn trailing(self, length: u32) -> Span
pub fn trailing_name(self, source: &str, name: &str) -> Option<Span>
pub fn name_segments(self, source: &str, name: &str) -> Option<Vec<Span>>
Trait Implementations§
impl Copy for Span
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Forget for Span
impl Freeze for Span
impl Move for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin 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