pub trait ServiceAttribute {
// Required methods
fn lifetime() -> ServiceScope;
fn name() -> Option<String>;
fn implements() -> Option<String>;
fn is_default() -> bool;
}
Expand description
Attribute-based service registration
Required Methods§
Sourcefn lifetime() -> ServiceScope
fn lifetime() -> ServiceScope
Get the configured lifetime
Sourcefn implements() -> Option<String>
fn implements() -> Option<String>
Get the interface this service implements
Sourcefn is_default() -> bool
fn is_default() -> bool
Check if this is the default implementation
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.