pub enum KernelImage {
GasMeter,
StorageQuota,
Gas,
Quota,
YieldSender,
YieldReceiver,
File,
HostOpen,
HostSave,
}Expand description
Identifies which kernel-assisted Image a given image_hash_chain refers to.
The four kernel-assisted Instance variants of the v3 design are
Gas{meter_key}, Quota{quota_key}, YieldSender{yield_key} (the EMIT
right) and YieldReceiver{Vec<yield_key>} (the CATCH right), plus the two
kernel-internal tables (GasMeter, StorageQuota) the unit handles index.
The older per-syscall factory/marker images (set_gas_meter, mint_gas,
yield_catcher, oog_marker, …) are gone: a syscall is now a host_yield of a
YieldSender carrying a kernel:* yield_key, caught by the kernel as the
root YieldReceiver — so those names are yield_keys, not Images.
Variants§
GasMeter
Kernel-internal gas meter table (never in chain hands).
StorageQuota
Kernel-internal storage quota table (never in chain hands).
Gas
Per-Instance Gas{meter_key} unit handle. State: a meter_key: Key
packed into the handle’s registers (see
crate::slot::key_to_regs).
Quota
Per-Instance Quota{quota_key} unit handle.
YieldSender
YieldSender{yield_key} — the EMIT right for a yield_key. State: the
yield_key: Key packed into the handle’s registers.
YieldReceiver
YieldReceiver{Vec<yield_key>} — the CATCH right: the set of yield_keys
an Instance catches. State (a serialized Set<Key>) lives in the
handle’s mem DataCap; the kernel short-circuits it during routing.
File
Per-Instance File{file_id} handle.
HostOpen
Per-Instance HostOpen handle.
HostSave
Per-Instance HostSave handle.
Trait Implementations§
Source§impl Clone for KernelImage
impl Clone for KernelImage
Source§fn clone(&self) -> KernelImage
fn clone(&self) -> KernelImage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more