pub struct AnyScope { /* private fields */ }Expand description
Untyped scope used for accessing parent scope
Implementations§
source§impl AnyScope
 
impl AnyScope
sourcepub fn get_parent(&self) -> Option<&AnyScope>
 
pub fn get_parent(&self) -> Option<&AnyScope>
Returns the parent scope
sourcepub fn get_type_id(&self) -> &TypeId
 
pub fn get_type_id(&self) -> &TypeId
Returns the type of the linked component
sourcepub fn downcast<COMP>(&self) -> Scope<COMP>where
    COMP: BaseComponent,
 
pub fn downcast<COMP>(&self) -> Scope<COMP>where
    COMP: BaseComponent,
Attempts to downcast into a typed scope
§Panics
If the self value can’t be cast into the target type.
sourcepub fn try_downcast<COMP>(&self) -> Option<Scope<COMP>>where
    COMP: BaseComponent,
 
pub fn try_downcast<COMP>(&self) -> Option<Scope<COMP>>where
    COMP: BaseComponent,
Attempts to downcast into a typed scope
Returns None if the self value can’t be cast into the target type.
sourcepub fn find_parent_scope<COMP>(&self) -> Option<Scope<COMP>>where
    COMP: BaseComponent,
 
pub fn find_parent_scope<COMP>(&self) -> Option<Scope<COMP>>where
    COMP: BaseComponent,
Attempts to find a parent scope of a certain type
Returns None if no parent scope with the specified type was found.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AnyScope
impl !Send for AnyScope
impl !Sync for AnyScope
impl Unpin for AnyScope
impl !UnwindSafe for AnyScope
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
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoPropValue<Option<T>> for T
 
impl<T> IntoPropValue<Option<T>> for T
source§fn into_prop_value(self) -> Option<T>
 
fn into_prop_value(self) -> Option<T>
Convert 
self to a value of a Properties struct.source§impl<T> IntoPropValue<T> for T
 
impl<T> IntoPropValue<T> for T
source§fn into_prop_value(self) -> T
 
fn into_prop_value(self) -> T
Convert 
self to a value of a Properties struct.