pub struct Span { /* private fields */ }Implementations§
Source§impl Span
impl Span
pub fn new(start: u32, end: u32) -> Self
pub fn new_with_length(start: u32, len: u32) -> Self
pub const fn new_short_span(start: u32, len: NonZeroU16) -> Self
pub fn new_empty_span(start: u32) -> Self
pub const fn new_short_empty_span(start: u16) -> Self
pub fn get_start(self) -> u32
pub fn get_end(self) -> u32
pub fn get_len(self) -> u32
pub fn offset(self, offset: u32) -> Self
pub fn signed_offset(self, offset: i64) -> Self
pub fn negative_offset(self, offset: u32) -> Self
pub fn extend(self, to: Self) -> Self
Trait Implementations§
impl Copy for Span
impl Eq 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.