pub struct WireFunctionCall {
pub function_name: String,
pub values: WireArena,
pub args: BudgetVec<NodeId>,
pub kwargs: BudgetVec<(NodeId, NodeId)>,
pub call_id: u32,
pub object_id: Option<MontyUuid>,
pub allow_eager_await: bool,
pub position: Option<SourceRange>,
}Expand description
Wire form of monty.v1.FunctionCall: the call’s argument arena plus the
ids of its positional and keyword arguments.
Installed with prost_build::extern_path, so generated ChildEvent
decoding still handles the envelope while this payload keeps the argument
vectors as bare ids and uses WireArena’s incremental node decoding.
Fields§
§function_name: StringName of the external function the sandbox is calling.
values: WireArenaThe arena args and kwargs index.
args: BudgetVec<NodeId>Positional arguments, in order.
kwargs: BudgetVec<(NodeId, NodeId)>Keyword arguments as (key, value) ids, preserving wire order.
call_id: u32Child-assigned call id used by the matching resume request.
object_id: Option<MontyUuid>Uuid of the routed receiver (a host-backed instance, or a class type
for __call__/classmethod calls); None for plain external function
calls. The receiver is never included in args.
allow_eager_await: boolThe worker accepts an eagerly settled coroutine via ResumeFutures.
position: Option<SourceRange>Where the call expression is in the source; None for a frame from a
child that predates the field.
Implementations§
Source§impl WireFunctionCall
impl WireFunctionCall
Sourcepub fn new(
function_name: String,
args: CallArgs,
call_id: u32,
object_id: Option<MontyUuid>,
allow_eager_await: bool,
position: SourceRange,
) -> Self
pub fn new( function_name: String, args: CallArgs, call_id: u32, object_id: Option<MontyUuid>, allow_eager_await: bool, position: SourceRange, ) -> Self
Splits args into its arena and the id vectors the wire carries.
Sourcepub fn into_call_args(self) -> Result<CallArgs, ProtoConvertError>
pub fn into_call_args(self) -> Result<CallArgs, ProtoConvertError>
Validates the decoded arena and argument ids into CallArgs.
Trait Implementations§
Source§impl Clone for WireFunctionCall
impl Clone for WireFunctionCall
Source§impl Debug for WireFunctionCall
impl Debug for WireFunctionCall
Source§impl Default for WireFunctionCall
impl Default for WireFunctionCall
Source§impl Message for WireFunctionCall
impl Message for WireFunctionCall
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.