Skip to main content

WireOwned

Trait WireOwned 

Source
pub trait WireOwned: Sealed { }
Expand description

Marker for CapHashOrRef::Owned payloads that participate in the content-addressed wire form. Implemented only for Box<Cap> (the default payload).

It is a deliberately leaf marker — implemented directly for Box<Cap> with no supertrait that recurses into Cap: Archive — so gating the wire impls (HashTreeRoot / Encode / Decode / rkyv Archive / Serialize) of CapHashOrRef<O> on O: WireOwned resolves by a single lookup, exactly as the original non-generic impls did (which required nothing of the inline Box<Cap>). Gating on O: rkyv::Archive instead would re-introduce the cyclic Box<Cap>: Archive → Cap: Archive bound and overflow the solver.

Engine-private cache payloads (e.g. Box<CachedCap>) deliberately do not implement it, so a cnode carrying one has no wire impl and cannot be hashed or serialised — a compile error, strictly stronger than the runtime Owned panic.

Sealed: only javm-cap implements it.

Implementations on Foreign Types§

Source§

impl WireOwned for Box<Cap>

Implementors§