Struct spdlog::SourceLocation
source · [−]pub struct SourceLocation { /* private fields */ }
Expand description
Represents a location in source code.
Implementations
sourceimpl SourceLocation
impl SourceLocation
sourcepub fn new(
module_path: &'static str,
file: &'static str,
line: u32,
column: u32
) -> Self
pub fn new(
module_path: &'static str,
file: &'static str,
line: u32,
column: u32
) -> Self
Constructs a SourceLocation
.
Users should usually use macro source_location_current
to construct
it.
sourcepub fn module_path(&self) -> &'static str
pub fn module_path(&self) -> &'static str
Gets the module path.
sourcepub fn file(&self) -> &'static str
pub fn file(&self) -> &'static str
Gets the source file.
It returns a string slice like this: src/main.rs
Trait Implementations
sourceimpl Clone for SourceLocation
impl Clone for SourceLocation
sourcefn clone(&self) -> SourceLocation
fn clone(&self) -> SourceLocation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SourceLocation
impl Debug for SourceLocation
Auto Trait Implementations
impl RefUnwindSafe for SourceLocation
impl Send for SourceLocation
impl Sync for SourceLocation
impl Unpin for SourceLocation
impl UnwindSafe for SourceLocation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more