pub struct Origin {
pub column: u32,
pub file: &'static str,
pub krate: &'static str,
pub line: u32,
pub module: &'static str,
}Expand description
Where a message type is defined — automatic provenance captured by
#[message], which emits the core location builtins
(env!("CARGO_PKG_NAME"), module_path!, file!, line!, column!) for
rustc to fill while compiling the defining crate.
Reachable on every message through Message::origin, so a subscriber can
attribute or route a &dyn Message without naming the concrete type. All
fields are &'static/u32, so Origin is Copy and stays no_std.
Fields§
§column: u32Column of the definition (column!()).
file: &'static strSource file of the definition (file!()).
krate: &'static strThe defining crate (CARGO_PKG_NAME); named krate because crate
cannot be written as a raw identifier.
line: u32Line of the definition (line!()).
module: &'static strThe defining module path (module_path!()), e.g. mycrate::sub.
Trait Implementations§
impl Copy for Origin
impl Eq for Origin
impl StructuralPartialEq for Origin
Auto Trait Implementations§
impl Freeze for Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnsafeUnpin for Origin
impl UnwindSafe for Origin
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.