Skip to main content

ServerObject

Struct ServerObject 

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

Server-side CompositionObject counterpart. Is responsible for animation activation and invalidation.

Implementations§

Source§

impl ServerObject

Source

pub fn new( compositor: &Rc<ServerCompositor>, owner: Weak<dyn IAnimatedServerObject>, ) -> Self

owner is the object that embeds this part.

Source

pub fn compositor(&self) -> Option<Rc<ServerCompositor>>

The compositor of the object, while it is alive.

Source

pub fn animations(&self) -> Option<Rc<ServerObjectAnimations>>

Source

pub fn get_or_create_animations(&self) -> Rc<ServerObjectAnimations>

Source

pub fn is_active(&self) -> bool

Source

pub fn activate(&self)

Source

pub fn deactivate(&self)

Source

pub fn set_value( &self, property: &'static CompositionProperty, change: ServerValueChange<'_>, )

SetValue(prop, ref field, value) of an animatable object: assigns and invalidates the subscriptions of the property.

Source

pub fn set_animated_value( &self, property: &'static CompositionProperty, current_value: ExpressionVariant, committed_at: Duration, animation: Rc<dyn IAnimationInstance>, )

SetAnimatedValue(prop, ref field, committedAt, animation).

Source

pub fn remove_animation_for_property( &self, property: &'static CompositionProperty, )

The tail of SetAnimatedValue(prop, out field, value).

Source

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

IExpressionObject.GetProperty of the owner.

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.