struct Location {
byte: u32,
}
Available on (crate features
formatting
or parsing
) and crate feature alloc
only.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