Skip to main content

RuntimeObject

Trait RuntimeObject 

Source
pub trait RuntimeObject:
    Object
    + ObjectCompat
    + Any
    + Send
    + Sync { }
Expand description

Marker trait every concrete runtime object satisfies.

The kernel requires that an object be an Object, be ObjectCompat, and be Any + Send + Sync; the blanket impl grants this trait to every type that meets those bounds. Libraries supply the concrete object kinds.

Implementations§

Source§

impl dyn RuntimeObject

Source

pub fn downcast_ref<T: Any>(&self) -> Option<&T>

Attempts to downcast the object to a concrete type T.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> RuntimeObject for T
where T: Object + ObjectCompat + Any + Send + Sync,