pub struct Callable {
pub name: Option<String>,
pub signature: CallableSignature,
pub body: CallableBody,
}Fields§
§name: Option<String>§signature: CallableSignature§body: CallableBodyImplementations§
Source§impl Callable
impl Callable
pub fn call( &self, args: &[ValueContainer], ) -> Result<Option<ValueContainer>, ExecutionError>
Trait Implementations§
Source§impl Apply for Callable
impl Apply for Callable
Source§fn apply(
&self,
args: &[ValueContainer],
) -> Result<Option<ValueContainer>, ExecutionError>
fn apply( &self, args: &[ValueContainer], ) -> Result<Option<ValueContainer>, ExecutionError>
Applies multiple ValueContainer arguments to self
Source§fn apply_single(
&self,
arg: &ValueContainer,
) -> Result<Option<ValueContainer>, ExecutionError>
fn apply_single( &self, arg: &ValueContainer, ) -> Result<Option<ValueContainer>, ExecutionError>
Applies a single ValueContainer argument to self
Source§impl StructuralEq for Callable
impl StructuralEq for Callable
Source§fn structural_eq(&self, other: &Self) -> bool
fn structural_eq(&self, other: &Self) -> bool
Check if two values are equal, ignoring the type.
impl Eq for Callable
impl StructuralPartialEq for Callable
Auto Trait Implementations§
impl Freeze for Callable
impl !RefUnwindSafe for Callable
impl !Send for Callable
impl !Sync for Callable
impl Unpin for Callable
impl UnsafeUnpin for Callable
impl !UnwindSafe for Callable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more