pub struct Span(Span);Tuple Fields§
§0: SpanImplementations§
Source§impl Span
 
impl Span
pub fn inclusive(start: u32, end: u32) -> Span
pub fn single_char(start: u32) -> Span
pub fn empty(position: u32) -> Span
pub fn merge(self, other: Span) -> Span
pub fn to_byte_span(self) -> ByteSpan
pub fn start(&self) -> u32
pub fn end(&self) -> u32
pub fn contains(&self, other: &Span) -> bool
Sourcepub fn intersects(&self, other: &Span) -> bool
 
pub fn intersects(&self, other: &Span) -> bool
Returns true if any point of self intersects a point of other.
Adjacent spans are considered to intersect (so, for example, 0..1 intersects 1..3).
pub fn is_smaller(&self, other: &Span) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Span
 
impl<'de> Deserialize<'de> for Span
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Span
 
impl Ord for Span
Source§impl PartialOrd for Span
 
impl PartialOrd 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