pub trait IAnimatedServerObject: IServerObject + IServerAnimatedPropertyHost {
// Required methods
fn server_object(&self) -> &ServerObject;
fn as_server_object_dyn(&self) -> &dyn IServerObject;
// Provided methods
fn get_composition_property(
&self,
_field_name: &str,
) -> Option<&'static CompositionProperty> { ... }
fn read_property_variant(
&self,
property: &'static CompositionProperty,
) -> ExpressionVariant { ... }
fn write_property_variant(
&self,
property: &'static CompositionProperty,
value: ExpressionVariant,
) { ... }
}Expand description
A server object that supports animated properties: what upstream’s
abstract ServerObject is to its subclasses.
A class “derives” from ServerObject by embedding a ServerObject
and implementing this trait; the embedded part reaches the class through
it.
Required Methods§
Sourcefn server_object(&self) -> &ServerObject
fn server_object(&self) -> &ServerObject
The embedded ServerObject part.
Sourcefn as_server_object_dyn(&self) -> &dyn IServerObject
fn as_server_object_dyn(&self) -> &dyn IServerObject
The object as the base contract (an explicit upcast).
Provided Methods§
Sourcefn get_composition_property(
&self,
_field_name: &str,
) -> Option<&'static CompositionProperty>
fn get_composition_property( &self, _field_name: &str, ) -> Option<&'static CompositionProperty>
The composition property with the given name, if the class has one.
Sourcefn read_property_variant(
&self,
property: &'static CompositionProperty,
) -> ExpressionVariant
fn read_property_variant( &self, property: &'static CompositionProperty, ) -> ExpressionVariant
Reads a property of the object as a variant. The default reads the field through
CompositionProperty::get_variant; an object with dynamic properties (a property set)
reads its own storage.
Sourcefn write_property_variant(
&self,
property: &'static CompositionProperty,
value: ExpressionVariant,
)
fn write_property_variant( &self, property: &'static CompositionProperty, value: ExpressionVariant, )
Writes a variant into a property of the object without notification (what an animation
does with the value it evaluated). The default writes the field through
CompositionProperty::set_variant; an object with dynamic properties writes its own
storage.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".