pub struct CallScratch {
pub args: Vec<ScriptValue>,
pub commands: Vec<ScriptCommand>,
}Expand description
The two buffers one call needs: the arguments going in, and the commands coming out.
A host builds the argument list on every call, and most bodies queue a
command, so both were an allocation per script call. Borrowing them from
with_call_scratch instead keeps the capacity between calls.
Fields§
§args: Vec<ScriptValue>The arguments, converted out of the engine’s own value type.
commands: Vec<ScriptCommand>What the body emitted, to be moved into the host’s sink.
Trait Implementations§
Source§impl Default for CallScratch
impl Default for CallScratch
Source§fn default() -> CallScratch
fn default() -> CallScratch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CallScratch
impl !RefUnwindSafe for CallScratch
impl Send for CallScratch
impl Sync for CallScratch
impl Unpin for CallScratch
impl UnsafeUnpin for CallScratch
impl !UnwindSafe for CallScratch
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
Mutably borrows from an owned value. Read more
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§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> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.