[][src]Struct code_location::CodeLocation

pub struct CodeLocation {
    pub file: &'static str,
    pub line: u32,
    pub column: u32,
}

A CodeLocation type to represent a certain point in a source code text file.

Examples

use code_location::{code_location, CodeLocation};

let code_location: CodeLocation = code_location!();
assert_eq!(code_location.to_string(), "src/lib.rs:6:35");
assert_eq!(code_location.file, "src/lib.rs");
assert_eq!(code_location.line, 6);
assert_eq!(code_location.column, 35);

Fields

file: &'static strline: u32column: u32

Trait Implementations

impl Clone for CodeLocation[src]

impl Copy for CodeLocation[src]

impl Debug for CodeLocation[src]

impl Display for CodeLocation[src]

impl Eq for CodeLocation[src]

impl Hash for CodeLocation[src]

impl Ord for CodeLocation[src]

impl PartialEq<CodeLocation> for CodeLocation[src]

impl PartialOrd<CodeLocation> for CodeLocation[src]

impl StructuralEq for CodeLocation[src]

impl StructuralPartialEq for CodeLocation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.