Skip to main content

ErasedRenderObject

Trait ErasedRenderObject 

Source
pub trait ErasedRenderObject:
    Copy
    + PartialEq
    + Debug
    + 'static {
    // Required methods
    fn as_object(self) -> AnyRenderObject;
    fn from_object(object: AnyRenderObject) -> Self;
}
Expand description

An erased render object a parent can hold as a child: Dart’s ChildType extends RenderObject type argument of RenderObjectWithChildMixin and ContainerRenderObjectMixin.

Implemented by crate::AnyRenderBox and crate::AnyRenderSliver.

Required Methods§

Source

fn as_object(self) -> AnyRenderObject

The RenderObject view of this handle.

Source

fn from_object(object: AnyRenderObject) -> Self

Dart’s implicit downcast of a RenderObject to ChildType.

§Panics

If object does not use this protocol.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§