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§
Provided Methods§
Sourcefn deserialize_changes_core(
&self,
_reader: &mut BatchStreamReader<'_>,
_committed_at: Duration,
)
fn deserialize_changes_core( &self, _reader: &mut BatchStreamReader<'_>, _committed_at: Duration, )
Reads the changes of the object from a batch.
Sourcefn values_invalidated(&self)
fn values_invalidated(&self)
Called after a group of values of the object changed.
Sourcefn deserialize_changes(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Applies the changes of the object from a batch.
Sourcefn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
The object as a render resource, if it is one.
Sourcefn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
The object as a brush, if it is a server-side brush.
Sourcefn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
The object as a pen, if it is a server-side pen.
Sourcefn as_render_data_geometry(
self: Rc<Self>,
) -> Option<Rc<dyn IRenderDataGeometry>>
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.
Sourcefn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
The object as a transform, if it is a server-side transform.
Sourcefn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
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.
Sourcefn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
The object as a composition surface, if it is one.
Sourcefn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
The object as an animatable object, if it is one.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".