pub struct ByteSpan {
pub start: ByteOffset,
pub end: ByteOffset,
}Expand description
Byte span into the original UTF-8 source.
Fields§
§start: ByteOffsetInclusive byte offset at which the span starts.
end: ByteOffsetExclusive byte offset at which the span ends.
Implementations§
Source§impl ByteSpan
impl ByteSpan
pub const fn new(start: ByteOffset, end: ByteOffset) -> Self
pub const fn from_usize(start: usize, end: usize) -> Self
pub const fn start_usize(self) -> usize
pub const fn end_usize(self) -> usize
Trait Implementations§
impl Copy for ByteSpan
impl Eq for ByteSpan
Source§impl Ord for ByteSpan
impl Ord for ByteSpan
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ByteSpan
impl PartialOrd for ByteSpan
impl StructuralPartialEq for ByteSpan
Auto Trait Implementations§
impl Freeze for ByteSpan
impl RefUnwindSafe for ByteSpan
impl Send for ByteSpan
impl Sync for ByteSpan
impl Unpin for ByteSpan
impl UnsafeUnpin for ByteSpan
impl UnwindSafe for ByteSpan
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