pub struct ServiceMetadata {
pub type_name: String,
pub lifetime: Option<ServiceScope>,
pub name: Option<String>,
pub implements: Option<String>,
pub is_default: bool,
pub tags: Vec<String>,
}
Expand description
Attribute macro support structures These would be used by proc macros to store metadata
Service metadata extracted from attributes
Fields§
§type_name: String
§lifetime: Option<ServiceScope>
§name: Option<String>
§implements: Option<String>
§is_default: bool
Implementations§
Source§impl ServiceMetadata
impl ServiceMetadata
pub fn new(type_name: String) -> Self
pub fn with_lifetime(self, lifetime: ServiceScope) -> Self
pub fn with_name(self, name: String) -> Self
pub fn implements(self, interface: String) -> Self
pub fn as_default(self) -> Self
pub fn with_tag(self, tag: String) -> Self
Trait Implementations§
Source§impl Clone for ServiceMetadata
impl Clone for ServiceMetadata
Source§fn clone(&self) -> ServiceMetadata
fn clone(&self) -> ServiceMetadata
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ServiceMetadata
impl RefUnwindSafe for ServiceMetadata
impl Send for ServiceMetadata
impl Sync for ServiceMetadata
impl Unpin for ServiceMetadata
impl UnwindSafe for ServiceMetadata
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