pub struct FlatLocal { /* private fields */ }Expand description
Host-side store: published programs, keyed by content hash.
Implementations§
Trait Implementations§
Source§impl LocalKernel for FlatLocal
impl LocalKernel for FlatLocal
Source§fn put_object(&mut self, bytes: &[u8]) -> Result<ObjHash>
fn put_object(&mut self, bytes: &[u8]) -> Result<ObjHash>
Decode + validate + content-hash
bytes and insert the object
into the store. Returns the personality-computed content hash.
Idempotent re-puts follow the personality’s own semantics
(JAVM: refcount bump). Read moreSource§fn put_object_with_hash(&mut self, hash: ObjHash, bytes: &[u8]) -> Result<()>
fn put_object_with_hash(&mut self, hash: ObjHash, bytes: &[u8]) -> Result<()>
Pre-hashed variant of
put_object: the
caller already knows the content hash, letting the impl skip
hashing on idempotent re-puts. Implementations may
debug-assert the claimed hash.Source§fn invoke(
&mut self,
root: ObjHash,
endpoint: u32,
args: [u64; 4],
initial_gas: u64,
) -> Result<InvocationResult>
fn invoke( &mut self, root: ObjHash, endpoint: u32, args: [u64; 4], initial_gas: u64, ) -> Result<InvocationResult>
Invoke
endpoint on the object graph rooted at root,
overlaying args per the personality’s register ABI, bounded
by initial_gas.Source§fn state_root(&self) -> ObjHash
fn state_root(&self) -> ObjHash
Content-addressed root of the current state (the personality
defines what “root” means; JAVM: hash of the invoking
Cap::Instance after the most recent invocation).Auto Trait Implementations§
impl Freeze for FlatLocal
impl RefUnwindSafe for FlatLocal
impl Send for FlatLocal
impl Sync for FlatLocal
impl Unpin for FlatLocal
impl UnsafeUnpin for FlatLocal
impl UnwindSafe for FlatLocal
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.