pub struct SourceLocation {
pub file: &'static str,
pub line: u32,
pub column: u32,
pub function: &'static str,
}Expand description
File and line captured at the declaration site. 在声明点捕获的文件和行号。
Fields§
§file: &'static strSource file path as recorded by file!() at the declaration site.
声明点由 file!() 记录的源码文件路径。
line: u32Line of the declaration site, as reported by line!().
声明点所在行号,由 line!() 报告。
column: u32Column of the declaration site, as reported by column!().
声明点所在列号,由 column!() 报告。
function: &'static strThe registration-face handle or logical function associated with this declaration. 与该注册面声明关联的 handle 或逻辑函数名。
Implementations§
Trait Implementations§
Source§impl Clone for SourceLocation
impl Clone for SourceLocation
Source§fn clone(&self) -> SourceLocation
fn clone(&self) -> SourceLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SourceLocation
Source§impl Debug for SourceLocation
impl Debug for SourceLocation
Source§impl Display for SourceLocation
impl Display for SourceLocation
impl Eq for SourceLocation
Source§impl From<SourceLocation> for DiagnosticSource
impl From<SourceLocation> for DiagnosticSource
Source§fn from(source: SourceLocation) -> DiagnosticSource
fn from(source: SourceLocation) -> DiagnosticSource
Converts to this type from the input type.
Source§impl PartialEq for SourceLocation
impl PartialEq for SourceLocation
impl StructuralPartialEq for SourceLocation
Auto Trait Implementations§
impl Freeze for SourceLocation
impl RefUnwindSafe for SourceLocation
impl Send for SourceLocation
impl Sync for SourceLocation
impl Unpin for SourceLocation
impl UnsafeUnpin for SourceLocation
impl UnwindSafe for SourceLocation
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