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,
§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.