pub struct ErrorLocation {
pub file: &'static str,
pub line: u32,
pub column: Option<u32>,
pub function: Option<&'static str>,
}
Expand description
Location information for error context
Fields§
§file: &'static str
File where the error occurred
line: u32
Line number where the error occurred
column: Option<u32>
Column number where the error occurred
function: Option<&'static str>
Function where the error occurred
Implementations§
Source§impl ErrorLocation
impl ErrorLocation
Sourcepub const fn with_function(
file: &'static str,
line: u32,
function: &'static str,
) -> Self
pub const fn with_function( file: &'static str, line: u32, function: &'static str, ) -> Self
Create a new error location with function information
Sourcepub const fn with_column(file: &'static str, line: u32, column: u32) -> Self
pub const fn with_column(file: &'static str, line: u32, column: u32) -> Self
Create a new error location with column information
Trait Implementations§
Source§impl Clone for ErrorLocation
impl Clone for ErrorLocation
Source§fn clone(&self) -> ErrorLocation
fn clone(&self) -> ErrorLocation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ErrorLocation
impl Debug for ErrorLocation
Auto Trait Implementations§
impl Freeze for ErrorLocation
impl RefUnwindSafe for ErrorLocation
impl Send for ErrorLocation
impl Sync for ErrorLocation
impl Unpin for ErrorLocation
impl UnwindSafe for ErrorLocation
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more