pub enum Scope {
Singleton,
Prototype,
}Expand description
组件的作用域
Singleton 单例作用域,默认
Prototype 原型作用域
Variants§
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn is_singleton(&self) -> bool
pub fn is_singleton(&self) -> bool
是否为单例
Sourcepub fn is_prototype(&self) -> bool
pub fn is_prototype(&self) -> bool
是否为原型
Trait Implementations§
impl Copy for Scope
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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