pub struct CompositionPropertyOf<T> { /* private fields */ }Expand description
A CompositionProperty with typed access to its field (upstream
CompositionProperty<T>).
Implementations§
Source§impl<T> CompositionPropertyOf<T>
impl<T> CompositionPropertyOf<T>
Sourcepub fn base(&self) -> &CompositionProperty
pub fn base(&self) -> &CompositionProperty
The untyped property.
Sourcepub fn get_field(&self, obj: &dyn IServerObject) -> T
pub fn get_field(&self, obj: &dyn IServerObject) -> T
Reads the field of the property.
Sourcepub fn set_field(&self, obj: &dyn IServerObject, value: T)
pub fn set_field(&self, obj: &dyn IServerObject, value: T)
Writes the field of the property, without any notification.
Methods from Deref<Target = CompositionProperty>§
pub fn id(&self) -> i32
pub fn name(&self) -> &'static str
Sourcepub fn owner(&self) -> TypeId
pub fn owner(&self) -> TypeId
The type that declares the property: the generated property block of the server class.
Sourcepub fn owner_name(&self) -> &'static str
pub fn owner_name(&self) -> &'static str
The name of the server class that declares the property.
Sourcepub fn get_variant(&self) -> Option<fn(&dyn IServerObject) -> ExpressionVariant>
pub fn get_variant(&self) -> Option<fn(&dyn IServerObject) -> ExpressionVariant>
Reads the property of an object as an expression variant; None for
a property whose type has no variant form.
Sourcepub fn set_variant(&self) -> Option<fn(&dyn IServerObject, ExpressionVariant)>
pub fn set_variant(&self) -> Option<fn(&dyn IServerObject, ExpressionVariant)>
Stores an expression variant into the field of the property, without
any notification; None for a property that cannot be animated.
This is the type-erased form of set_field an animation uses to
write the value it evaluated.
Trait Implementations§
Source§impl<T> Deref for CompositionPropertyOf<T>
impl<T> Deref for CompositionPropertyOf<T>
Source§type Target = CompositionProperty
type Target = CompositionProperty
The resulting type after dereferencing.
Source§fn deref(&self) -> &CompositionProperty
fn deref(&self) -> &CompositionProperty
Dereferences the value.
Auto Trait Implementations§
impl<T> Freeze for CompositionPropertyOf<T>where
fn(&(dyn IServerObject + 'static)) -> T: Freeze,
fn(&(dyn IServerObject + 'static), T): Freeze,
impl<T> RefUnwindSafe for CompositionPropertyOf<T>where
fn(&(dyn IServerObject + 'static)) -> T: RefUnwindSafe,
fn(&(dyn IServerObject + 'static), T): RefUnwindSafe,
impl<T> Send for CompositionPropertyOf<T>
impl<T> Sync for CompositionPropertyOf<T>
impl<T> Unpin for CompositionPropertyOf<T>
impl<T> UnsafeUnpin for CompositionPropertyOf<T>where
fn(&(dyn IServerObject + 'static)) -> T: UnsafeUnpin,
fn(&(dyn IServerObject + 'static), T): UnsafeUnpin,
impl<T> UnwindSafe for CompositionPropertyOf<T>where
fn(&(dyn IServerObject + 'static)) -> T: UnwindSafe,
fn(&(dyn IServerObject + 'static), T): UnwindSafe,
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> 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