pub struct JavmLocal { /* private fields */ }Expand description
The JAVM Local-backend kernel: cap directory + interpreter wiring.
Implementations§
Source§impl JavmLocal
impl JavmLocal
Sourcepub fn put_cap(&mut self, cap: &Cap) -> Result<CapHash>
pub fn put_cap(&mut self, cap: &Cap) -> Result<CapHash>
Typed, encode-free publish — the fast path behind
Nub::put_cap via nub::Nub::with_local.
Sourcepub fn put_cap_with_hash(&mut self, hash: CapHash, cap: &Cap) -> Result<()>
pub fn put_cap_with_hash(&mut self, hash: CapHash, cap: &Cap) -> Result<()>
Typed pre-hashed publish. See
Nub::put_cap_with_hash.
Trait Implementations§
Source§impl LocalKernel for JavmLocal
impl LocalKernel for JavmLocal
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 JavmLocal
impl !RefUnwindSafe for JavmLocal
impl Send for JavmLocal
impl Sync for JavmLocal
impl Unpin for JavmLocal
impl UnsafeUnpin for JavmLocal
impl UnwindSafe for JavmLocal
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.