pub struct ErrorLocation {
pub file: String,
pub line: u32,
pub column: u32,
pub function: Option<String>,
}Expand description
Source location information for error tracking
Fields§
§file: StringFile where the error occurred
line: u32Line number where the error occurred
column: u32Column number where the error occurred
function: Option<String>Function or method name (if available)
Implementations§
Source§impl ErrorLocation
impl ErrorLocation
Sourcepub fn with_function(self, function: &str) -> Self
pub fn with_function(self, function: &str) -> Self
Add function information to the location
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorLocation
impl Debug for ErrorLocation
Source§impl Display for ErrorLocation
impl Display 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