Skip to main content

IServerObject

Trait IServerObject 

Source
pub trait IServerObject: 'static {
Show 15 methods // Required methods fn as_any(&self) -> &dyn Any; fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>; // Provided methods fn deserialize_changes_core( &self, _reader: &mut BatchStreamReader<'_>, _committed_at: Duration, ) { ... } fn values_invalidated(&self) { ... } fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, ) { ... } fn dispose(&self) { ... } fn as_render_resource( self: Rc<Self>, ) -> Option<Rc<dyn IServerRenderResource>> { ... } fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>> { ... } fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>> { ... } fn as_render_data_geometry( self: Rc<Self>, ) -> Option<Rc<dyn IRenderDataGeometry>> { ... } fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>> { ... } fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>> { ... } fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>> { ... } fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>> { ... } fn get_props(&self, _type_id: TypeId) -> Option<&dyn Any> { ... }
}
Expand description

The base contract of every server-side object (upstream SimpleServerObject).

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>

Provided Methods§

Source

fn deserialize_changes_core( &self, _reader: &mut BatchStreamReader<'_>, _committed_at: Duration, )

Reads the changes of the object from a batch.

Source

fn values_invalidated(&self)

Called after a group of values of the object changed.

Source

fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )

Applies the changes of the object from a batch.

Source

fn dispose(&self)

Releases the object: it has been disposed on the UI thread.

Source

fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>

The object as a render resource, if it is one.

Source

fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>

The object as a brush, if it is a server-side brush.

Source

fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>

The object as a pen, if it is a server-side pen.

Source

fn as_render_data_geometry( self: Rc<Self>, ) -> Option<Rc<dyn IRenderDataGeometry>>

The object as a geometry usable by render data, if it is a server-side geometry.

Source

fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>

The object as a transform, if it is a server-side transform.

Source

fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>

The object as a gradient stop, if it is a server-side gradient stop.

Source

fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>

The object as a composition surface, if it is one.

Source

fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>

The object as an animatable object, if it is one.

Source

fn get_props(&self, _type_id: TypeId) -> Option<&dyn Any>

The generated property block of the given type embedded in the object, if it has one. A class that embeds generated properties forwards to their find_props; composition properties locate their fields through it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§