pub struct FunctionHandle { /* private fields */ }Implementations§
Source§impl FunctionHandle
impl FunctionHandle
pub fn from_value(value: Value) -> Result<Self>
pub fn as_value(&self) -> &Value
pub fn into_value(self) -> Value
pub fn signature<'a>( &'a self, program: &'a EmbeddedProgram, ) -> Option<(&'a str, &'a FunctionSignature)>
pub fn matches_signature( &self, program: &EmbeddedProgram, expected: &FunctionSignature, ) -> bool
pub fn validate_signature( &self, program: &EmbeddedProgram, expected: &FunctionSignature, ) -> Result<()>
pub fn call_raw( &self, program: &mut EmbeddedProgram, args: Vec<Value>, ) -> Result<Value>
pub fn call_typed<Args, R>(
&self,
program: &mut EmbeddedProgram,
args: Args,
) -> Result<R>where
Args: FunctionArgs,
R: FromLustValue,
Trait Implementations§
Source§impl Clone for FunctionHandle
impl Clone for FunctionHandle
Source§fn clone(&self) -> FunctionHandle
fn clone(&self) -> FunctionHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl FromLustValue for FunctionHandle
impl FromLustValue for FunctionHandle
fn from_value(value: Value) -> Result<Self>
fn matches_lust_type(ty: &Type) -> bool
fn type_description() -> &'static str
Source§impl<'a> FromStructField<'a> for FunctionHandle
impl<'a> FromStructField<'a> for FunctionHandle
Source§impl IntoLustValue for FunctionHandle
impl IntoLustValue for FunctionHandle
fn into_value(self) -> Value
fn matches_lust_type(ty: &Type) -> bool
fn type_description() -> &'static str
Source§impl IntoTypedValue for FunctionHandle
impl IntoTypedValue for FunctionHandle
fn into_typed_value(self) -> TypedValue
Auto Trait Implementations§
impl Freeze for FunctionHandle
impl !RefUnwindSafe for FunctionHandle
impl !Send for FunctionHandle
impl !Sync for FunctionHandle
impl Unpin for FunctionHandle
impl UnsafeUnpin for FunctionHandle
impl !UnwindSafe for FunctionHandle
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