pub struct RemoteCallRequest {
pub program: BytecodeProgram,
pub function_name: String,
pub function_id: Option<u16>,
pub function_hash: Option<FunctionHash>,
pub arguments: Vec<SerializableVMValue>,
pub upvalues: Option<Vec<SerializableVMValue>>,
pub type_schemas: TypeSchemaRegistry,
pub program_hash: [u8; 32],
pub function_blobs: Option<Vec<(FunctionHash, FunctionBlob)>>,
}Expand description
Request to execute a function on a remote VM.
Contains everything needed to call a function: the full compiled program
(cacheable by program_hash), function identity, serialized arguments,
and optional closure captures.
Fields§
§program: BytecodeProgramThe full compiled program. After the first transfer, the remote
side caches by program_hash and subsequent calls only need args.
function_name: StringFunction to call by name (for named functions).
function_id: Option<u16>Function to call by ID (for closures that have no user-facing name).
Takes precedence over function_name when Some.
function_hash: Option<FunctionHash>Function to call by content hash (canonical identity).
Preferred over name-based lookup when present. This avoids ambiguity when multiple modules define functions with the same name.
arguments: Vec<SerializableVMValue>Serialized arguments to the function.
upvalues: Option<Vec<SerializableVMValue>>Closure upvalues, if calling a closure. These are value-copied from
the sender’s Arc<RwLock<ValueWord>> upvalue slots.
type_schemas: TypeSchemaRegistryType schema registry — sent separately because BytecodeProgram
has #[serde(skip)] on its registry (it’s populated at compile time).
program_hash: [u8; 32]Content hash of the program for caching. If the remote side has already seen this hash, it can skip deserializing the program.
function_blobs: Option<Vec<(FunctionHash, FunctionBlob)>>Minimal content-addressed blobs for the called function and its
transitive dependencies. When present, the callee can reconstruct
a Program from these blobs instead of deserializing the full
BytecodeProgram, dramatically reducing payload size.
Trait Implementations§
Source§impl Clone for RemoteCallRequest
impl Clone for RemoteCallRequest
Source§fn clone(&self) -> RemoteCallRequest
fn clone(&self) -> RemoteCallRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoteCallRequest
impl Debug for RemoteCallRequest
Source§impl<'de> Deserialize<'de> for RemoteCallRequest
impl<'de> Deserialize<'de> for RemoteCallRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RemoteCallRequest
impl RefUnwindSafe for RemoteCallRequest
impl Send for RemoteCallRequest
impl Sync for RemoteCallRequest
impl Unpin for RemoteCallRequest
impl UnsafeUnpin for RemoteCallRequest
impl UnwindSafe for RemoteCallRequest
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more