pub trait CitizenRuntime:
Citizen
+ Object
+ ObjectCompat
+ ObjectEncode
+ PartialEq
+ Debug {
// Required methods
fn citizen_info() -> CitizenInfo;
fn conformance(cx: &mut Cx) -> Result<()>;
fn construct_from_values(cx: &mut Cx, args: Vec<Value>) -> Result<Self>;
fn example() -> Self;
// Provided method
fn install(linker: &mut Linker<'_>) -> Result<()>
where Self: Sized { ... }
}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§
Sourcefn citizen_info() -> CitizenInfo
fn citizen_info() -> CitizenInfo
Returns the static registry row for this citizen type.
The derive emits this metadata independently of the inventory row, so a
crate can register its citizens explicitly with
CitizenRegistry::register in
builds where link-time constructor collection is unsuitable.
Sourcefn conformance(cx: &mut Cx) -> Result<()>
fn conformance(cx: &mut Cx) -> Result<()>
Runs this citizen’s conformance fixture set.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".