Skip to main content

CompositionPropertyOf

Struct CompositionPropertyOf 

Source
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>

Source

pub fn base(&self) -> &CompositionProperty

The untyped property.

Source

pub fn get_field(&self, obj: &dyn IServerObject) -> T

Reads the field of the property.

Source

pub fn set_field(&self, obj: &dyn IServerObject, value: T)

Writes the field of the property, without any notification.

Methods from Deref<Target = CompositionProperty>§

Source

pub fn id(&self) -> i32

Source

pub fn name(&self) -> &'static str

Source

pub fn owner(&self) -> TypeId

The type that declares the property: the generated property block of the server class.

Source

pub fn owner_name(&self) -> &'static str

The name of the server class that declares the property.

Source

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.

Source

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>

Source§

type Target = CompositionProperty

The resulting type after dereferencing.
Source§

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>
where fn(&(dyn IServerObject + 'static)) -> T: Send, fn(&(dyn IServerObject + 'static), T): Send,

§

impl<T> Sync for CompositionPropertyOf<T>
where fn(&(dyn IServerObject + 'static)) -> T: Sync, fn(&(dyn IServerObject + 'static), T): Sync,

§

impl<T> Unpin for CompositionPropertyOf<T>
where fn(&(dyn IServerObject + 'static)) -> T: Unpin, fn(&(dyn IServerObject + 'static), T): Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.