pub trait GuardedArgs {
type Guard;
// Required methods
unsafe fn guarded_into_stack(
self,
stack: &mut Stack,
) -> VmResult<Self::Guard>;
unsafe fn guarded_into_vec(self) -> VmResult<(Vec<Value>, Self::Guard)>;
fn count(&self) -> usize;
}
Expand description
Trait for converting arguments onto the stack.
This can take references, because it is unsafe to call. And should only be implemented in contexts where it can be guaranteed that the references will not outlive the call.
Required Associated Types§
Required Methods§
Sourceunsafe fn guarded_into_stack(self, stack: &mut Stack) -> VmResult<Self::Guard>
unsafe fn guarded_into_stack(self, stack: &mut Stack) -> VmResult<Self::Guard>
Encode arguments onto a stack.
§Safety
This can encode references onto the stack. The caller must ensure that the guard is dropped before any references which have been encoded are no longer alive.