pub enum StyleHostRef {
Element(Ref<StyledElement>),
Other(Rc<dyn IStyleHost>),
}Expand description
A strong reference to a style host: a styled element, or another host such as the application object.
Variants§
Element(Ref<StyledElement>)
Other(Rc<dyn IStyleHost>)
Implementations§
Source§impl StyleHostRef
impl StyleHostRef
Sourcepub fn as_element(&self) -> Option<&Ref<StyledElement>>
pub fn as_element(&self) -> Option<&Ref<StyledElement>>
The host as a styled element, if it is one.
Sourcepub fn to_resource_host(&self) -> ResourceHostRef
pub fn to_resource_host(&self) -> ResourceHostRef
The host as a resource host.
Trait Implementations§
Source§impl Clone for StyleHostRef
impl Clone for StyleHostRef
Source§impl Deref for StyleHostRef
impl Deref for StyleHostRef
Source§type Target = dyn IStyleHost
type Target = dyn IStyleHost
The resulting type after dereferencing.
Source§fn deref(&self) -> &(dyn IStyleHost + 'static)
fn deref(&self) -> &(dyn IStyleHost + 'static)
Dereferences the value.
Source§impl<T: ObjectType + Upcast<StyledElement>> From<&Ref<T>> for StyleHostRef
impl<T: ObjectType + Upcast<StyledElement>> From<&Ref<T>> for StyleHostRef
Source§impl<T: IStyleHost + 'static> From<Rc<T>> for StyleHostRef
impl<T: IStyleHost + 'static> From<Rc<T>> for StyleHostRef
Source§impl From<Rc<dyn IStyleHost>> for StyleHostRef
impl From<Rc<dyn IStyleHost>> for StyleHostRef
Source§fn from(value: Rc<dyn IStyleHost>) -> Self
fn from(value: Rc<dyn IStyleHost>) -> Self
Converts to this type from the input type.
Source§impl<T: ObjectType + Upcast<StyledElement>> From<Ref<T>> for StyleHostRef
impl<T: ObjectType + Upcast<StyledElement>> From<Ref<T>> for StyleHostRef
Auto Trait Implementations§
impl !RefUnwindSafe for StyleHostRef
impl !Send for StyleHostRef
impl !Sync for StyleHostRef
impl !UnwindSafe for StyleHostRef
impl Freeze for StyleHostRef
impl Unpin for StyleHostRef
impl UnsafeUnpin for StyleHostRef
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more