Skip to main content

ResidentCap

Trait ResidentCap 

Source
pub trait ResidentCap {
    // Required methods
    fn from_cap(cap: Cap) -> Self;
    fn as_cap(&self) -> ⋒
    fn into_cap(self) -> Cap;
}
Expand description

Payload stored by a CacheDirectory. The public/wire directory stores plain Cap; engines may store a resident wrapper that carries derived runtime caches while still exposing the underlying wire cap for hashing and inspection.

Required Methods§

Source

fn from_cap(cap: Cap) -> Self

Wrap a public wire cap for resident storage.

Source

fn as_cap(&self) -> &Cap

Borrow the public wire cap.

Source

fn into_cap(self) -> Cap

Consume the resident payload back into its wire cap.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§