pub struct Span {
pub start: usize,
pub end: usize,
}Expand description
A span of contiguous bytes, from start to end, represented via byte offsets.
The range is inclusive at the beginning and exclusive at the end.
Fields§
§start: usizeThe starting byte offset of the match.
end: usizeThe ending byte offset of the match.
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 From<Span> for Captures
Converts a plain Span to a Captures value, where the span corresponds to
the first and only group in Captures. Since a Span does not contain a
pattern ID, the pattern ID used in this conversion is always 0.
impl From<Span> for Captures
Converts a plain Span to a Captures value, where the span corresponds to
the first and only group in Captures. Since a Span does not contain a
pattern ID, the pattern ID used in this conversion is always 0.
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.