Skip to main content

PropertySetSnapshot

Struct PropertySetSnapshot 

Source
pub struct PropertySetSnapshot { /* private fields */ }
Expand description

A snapshot of properties used by an animation

The snapshot is taken on the UI thread, where a reference parameter is known by the id of its server object; the ids are resolved on the server by resolve, before the animation instance that holds the snapshot is initialized.

Implementations§

Source§

impl PropertySetSnapshot

Source

pub fn new(dic: HashMap<String, PropertySetSnapshotValue>) -> Self

Source

pub fn get_parameter(&self, name: &str) -> ExpressionVariant

Source

pub fn get_object_parameter(&self, name: &str) -> Option<&dyn IExpressionObject>

Source

pub fn get_server_object_parameter( &self, name: &str, ) -> Option<Rc<dyn IAnimatedServerObject>>

The parameter as a server object, when it refers to one (the is ServerObject test of upstream on GetObjectParameter).

Source

pub fn get_property(&self, name: &str) -> ExpressionVariant

Source

pub fn resolve(&self, compositor: &ServerCompositor)

Resolves the server objects the snapshot refers to on compositor, nested property sets included.

Upstream the snapshot holds the server objects themselves. An id names its server object until the composition object that holds it is dropped, disposed or not, and the snapshot is resolved by the batch that carries it, which precedes the release of any object it refers to; an id that names no animatable object leaves the parameter without an object, as a null reference does upstream.

Trait Implementations§

Source§

impl IExpressionObject for PropertySetSnapshot

Source§

fn get_property(&self, name: &str) -> ExpressionVariant

Gets the value of the property with the given name; Invalid when there is no such property.
Source§

fn key(&self) -> ExpressionObjectKey

The identity of the object, used to track the objects an expression depends on (see ExpressionTrackedObjects). The default is the address of the object, which is its reference identity for as long as the object is alive and not moved; an implementation that has a stable identifier should return that instead.
Source§

impl IExpressionParameterCollection for PropertySetSnapshot

Source§

fn get_parameter(&self, name: &str) -> ExpressionVariant

Gets the value of a parameter; Invalid when there is no such parameter.
Source§

fn get_object_parameter(&self, name: &str) -> Option<&dyn IExpressionObject>

Gets the object a parameter refers to, if the parameter is an object.

Auto Trait Implementations§

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