Skip to main content

SnapshotServerObject

Struct SnapshotServerObject 

Source
pub struct SnapshotServerObject(/* private fields */);
Expand description

The server object a reference parameter refers to, held weakly.

Upstream the snapshot holds the server object, and the garbage collector reclaims two animations that refer to each other’s targets. Here the animations of an object hold its instances, and an instance holds its parameters, so a strong reference would form a cycle between two such objects; the snapshot holds the object weakly, as the instance holds its target. The object outlives its disposal while its composition object is alive, so the reference goes dead only once nothing refers to the object any more; a dead reference is read as a parameter without an object.

Implementations§

Source§

impl SnapshotServerObject

Source

pub fn upgrade(&self) -> Option<Rc<dyn IAnimatedServerObject>>

The server object, while it is alive.

Trait Implementations§

Source§

impl IExpressionObject for SnapshotServerObject

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.

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.