Skip to main content

CitizenRuntime

Trait CitizenRuntime 

Source
pub trait CitizenRuntime:
    Citizen
    + Object
    + ObjectCompat
    + ObjectEncode
    + PartialEq
    + Debug {
    // Required methods
    fn construct_from_values(cx: &mut Cx, args: Vec<Value>) -> Result<Self>;
    fn example() -> Self;
}
Expand description

A fully runnable citizen: identity plus kernel object and read-construct.

Combines Citizen with the kernel object, encoding, and equality bounds needed to install the type as a class and round-trip it through read-construct. Read-construct stays capability-gated by the runtime path, not by implementing this trait.

Required Methods§

Source

fn construct_from_values(cx: &mut Cx, args: Vec<Value>) -> Result<Self>

Builds the citizen from decoded constructor argument values.

Source

fn example() -> Self

Returns the canonical example value used as a conformance fixture.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§