pub struct RegisteredAt {
pub crate_name: String,
pub module_path: String,
}
Expand description
Information on the callsite where the component was registered.
Fields§
§crate_name: String
The name of the crate that registered the component against the blueprint builder,
as it appears in the package
section of its Cargo.toml
.
In particular,
it has not been normalised—e.g. hyphens are not replaced with underscores.
This information is needed to resolve the import path unambiguously.
E.g. my_crate::module_1::type_2
—which crate is my_crate
?
This is not obvious due to the possibility of renaming dependencies in Cargo.toml
:
[package]
name = "mypackage"
version = "0.0.1"
[dependencies]
my_crate = { version = "0.1", registry = "custom", package = "their_crate" }
module_path: String
The path to the module where the component was registered, obtained via module_path!
.
Trait Implementations§
Source§impl Clone for RegisteredAt
impl Clone for RegisteredAt
Source§fn clone(&self) -> RegisteredAt
fn clone(&self) -> RegisteredAt
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RegisteredAt
impl Debug for RegisteredAt
Source§impl<'de> Deserialize<'de> for RegisteredAt
impl<'de> Deserialize<'de> for RegisteredAt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for RegisteredAt
impl Hash for RegisteredAt
Source§impl PartialEq for RegisteredAt
impl PartialEq for RegisteredAt
Source§impl Serialize for RegisteredAt
impl Serialize for RegisteredAt
impl Eq for RegisteredAt
impl StructuralPartialEq for RegisteredAt
Auto Trait Implementations§
impl Freeze for RegisteredAt
impl RefUnwindSafe for RegisteredAt
impl Send for RegisteredAt
impl Sync for RegisteredAt
impl Unpin for RegisteredAt
impl UnwindSafe for RegisteredAt
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