struct Location {
byte: u32,
}
Expand description
A location within a string.
Fields§
§byte: u32
The zero-indexed byte of the string.
Implementations§
source§impl Location
impl Location
sourceconst fn offset(&self, offset: u32) -> Self
const fn offset(&self, offset: u32) -> Self
Offset the location by the provided amount.
Note that this assumes the resulting location is on the same line as the original location.
sourceconst fn error(self, message: &'static str) -> ErrorInner
const fn error(self, message: &'static str) -> ErrorInner
Create an error with the provided message at this location.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)