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: BaseComponent>(&self) -> Scope<COMP>
pub fn downcast<COMP: BaseComponent>(&self) -> Scope<COMP>
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: BaseComponent>(&self) -> Option<Scope<COMP>>
pub fn try_downcast<COMP: BaseComponent>(&self) -> Option<Scope<COMP>>
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: BaseComponent>(&self) -> Option<Scope<COMP>>
pub fn find_parent_scope<COMP: BaseComponent>(&self) -> Option<Scope<COMP>>
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 Freeze for AnyScope
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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.