Struct trackable::Location
[−]
[src]
pub struct Location { /* fields omitted */ }
The location of interest in source code files.
Typically this is created in the macros which defined in this crate.
Methods
impl Location
[src]
fn new(
module_path: &'static str,
file: &'static str,
line: u32,
message: String
) -> Self
module_path: &'static str,
file: &'static str,
line: u32,
message: String
) -> Self
Makes a new Location
instance.
Examples
use trackable::Location; let location = Location::new(module_path!(), file!(), line!(), "Hello".to_string()); assert_eq!(location.message(), "Hello");
fn crate_name(&self) -> &'static str
Gets the crate name of this location.
fn module_path(&self) -> &'static str
Gets the module path of this location.
fn file(&self) -> &'static str
Gets the file name of this location.
fn line(&self) -> u32
Gets the line of this location.
fn message(&self) -> &str
Gets the message left at this location.
Trait Implementations
impl Debug for Location
[src]
impl Clone for Location
[src]
fn clone(&self) -> Location
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more