pub fn call<A, N>(mut self, name: N, args: A) -> Result<Value, VmError>
    where
        N: IntoTypeHash,
        A: GuardedArgs,
    {
        self.set_entrypoint(name, args.count())?;

        // Safety: We hold onto the guard until the vm has completed.
        let guard = unsafe { args.unsafe_into_stack(&mut self.stack)? };

        let value = self.into_execution().complete()?;

        // Note: this might panic if something in the vm is holding on to a
        // reference of the value. We should prevent it from being possible to
        // take any owned references to values held by this.
        drop(guard);
        Ok(value)
    }
/// Call the given function immediately, returning the produced value.
///
/// This function permits for using references since it doesn't defer its
/// execution.
///
/// # Panics
///
/// If any of the arguments passed in are references, and that references is
/// captured somewhere in the call as [`Mut<T>`] or [`Ref<T>`]
/// this call will panic as we are trying to free the metadata relatedc to
/// the reference.
///
/// [`Mut<T>`]: crate::Mut
/// [`Ref<T>`]: crate::Ref
Call the given function immediately, returning the produced value.
This function permits for using references since it doesn't defer its
execution.
Call the given function immediately returning the produced value . This function permits for using references since it doesn ' t defer its execution .
pub fn call<A, N>(mut self, name: N, args: A) -> Result<Value, VmError>
    where
        N: IntoTypeHash,
        A: GuardedArgs,
    {
        self.set_entrypoint(name, args.count())?;
        // Safety: We hold onto the guard until the vm has completed.
        let guard = unsafe { args.unsafe_into_stack(&mut self.stack)? };
        let value = self.into_execution().complete()?;
        // Note: this might panic if something in the vm is holding on to a
        // reference of the value. We should prevent it from being possible to
        // take any owned references to values held by this.
        drop(guard);
        Ok(value)
    }
pub fn call < A , N > ( mut self , name : N , args : A ) -> Result < Value , VmError > where N : IntoTypeHash , A : GuardedArgs , { self . set_entrypoint ( name , args . count ( ) ) ? ; // Safety: We hold onto the guard until the vm has completed. let guard = unsafe { args . unsafe_into_stack ( & mut self . stack ) ? } ; let value = self . into_execution ( ) . complete ( ) ? ; // Note: this might panic if something in the vm is holding on to a // reference of the value. We should prevent it from being possible to // take any owned references to values held by this. drop ( guard ) ; Ok ( value ) }
Call the given function immediately, returning the produced value.
Call the given function immediately returning the produced value .
mut self
name
N
args
A
mut self
name
N
args
A
panics
If any of the arguments passed in are references, and that references is
captured somewhere in the call as [`Mut`] or [`Ref`]
this call will panic as we are trying to free the metadata relatedc to
the reference.


If any of the arguments passed in are references and that references is captured somewhere in the call as [ ` Mut ` ] or [ ` Ref ` ] this call will panic as we are trying to free the metadata relatedc to the reference .