pub struct ByteLocation(pub Location);Expand description
A wrapper around a Location that implements From<usize>.
The Location type itself doesn’t implement From<usize>,
because it wants to be absolutely clear that byte offsets are being used
instead of than codepoint offsets.
Needed to implement chumsky::span::Span in a manner compatible with chumsky::input::MappedSpan.
Tuple Fields§
§0: LocationTrait Implementations§
Source§impl Clone for ByteLocation
impl Clone for ByteLocation
Source§fn clone(&self) -> ByteLocation
fn clone(&self) -> ByteLocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ByteLocation
impl Debug for ByteLocation
Source§impl Deref for ByteLocation
impl Deref for ByteLocation
Source§impl From<ByteLocation> for Location
impl From<ByteLocation> for Location
Source§fn from(location: ByteLocation) -> Self
fn from(location: ByteLocation) -> Self
Converts to this type from the input type.
Source§impl From<ByteLocation> for Span
impl From<ByteLocation> for Span
Source§fn from(location: ByteLocation) -> Self
fn from(location: ByteLocation) -> Self
Converts to this type from the input type.
Source§impl From<Location> for ByteLocation
impl From<Location> for ByteLocation
Source§impl From<usize> for ByteLocation
impl From<usize> for ByteLocation
Source§impl PartialEq for ByteLocation
impl PartialEq for ByteLocation
impl Copy for ByteLocation
impl Eq for ByteLocation
impl StructuralPartialEq for ByteLocation
Auto Trait Implementations§
impl Freeze for ByteLocation
impl RefUnwindSafe for ByteLocation
impl Send for ByteLocation
impl Sync for ByteLocation
impl Unpin for ByteLocation
impl UnwindSafe for ByteLocation
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.