pub struct Callable {
pub name: Option<String>,
pub signature: CallableTypeDefinition,
pub body: CallableBody,
}Fields§
§name: Option<String>§signature: CallableTypeDefinition§body: CallableBodyImplementations§
Source§impl Callable
impl Callable
pub fn call( &self, args: &[ValueContainer], ) -> Result<Option<ValueContainer>, CallableError>
Trait Implementations§
Source§impl Apply for Callable
impl Apply for Callable
Source§fn try_apply(
&self,
args: &[ValueContainer],
) -> Result<Option<ValueContainer>, ApplyError>
fn try_apply( &self, args: &[ValueContainer], ) -> Result<Option<ValueContainer>, ApplyError>
Applies multiple ValueContainer arguments to self
Source§fn try_apply_single(
&self,
arg: &ValueContainer,
) -> Result<Option<ValueContainer>, ApplyError>
fn try_apply_single( &self, arg: &ValueContainer, ) -> Result<Option<ValueContainer>, ApplyError>
Applies a single ValueContainer argument to self
Source§impl DatexProxyTypes for Callable
impl DatexProxyTypes for Callable
fn datex_type(_memory: &mut SharedReferencesCache) -> Type
impl DatexValueProxy for Callable
Source§impl DatexValueProxyDeserialize for Callable
impl DatexValueProxyDeserialize for Callable
fn try_from_value(value: Value) -> Result<Self, TryFromDatexValueError>
fn try_from_map_property( value: Result<Value, KeyNotFoundError>, ) -> Result<Self, TryFromDatexValueError>
Source§impl DatexValueProxySerialize for Callable
impl DatexValueProxySerialize for Callable
fn try_to_value(self) -> Result<Value, TryToDatexValueError>
impl Eq for Callable
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 StructuralPartialEq for Callable
Auto Trait Implementations§
impl !RefUnwindSafe for Callable
impl !Send for Callable
impl !Sync for Callable
impl !UnwindSafe for Callable
impl Freeze for Callable
impl Unpin for Callable
impl UnsafeUnpin 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,
impl<T> DatexValueContainerProxy for Twhere
T: DatexValueProxy,
Source§impl<T> DatexValueContainerProxyDeserialize for Twhere
T: DatexValueProxyDeserialize,
impl<T> DatexValueContainerProxyDeserialize for Twhere
T: DatexValueProxyDeserialize,
fn try_from_value_container( value: ValueContainer, ) -> Result<T, TryFromDatexValueError>
fn try_from_map_property( value: Result<ValueContainer, KeyNotFoundError>, ) -> Result<T, TryFromDatexValueError>
Source§fn try_from_bytes(
dxb: Vec<u8>,
runtime: &Runtime,
) -> Result<Self, DeserializationError>
fn try_from_bytes( dxb: Vec<u8>, runtime: &Runtime, ) -> Result<Self, DeserializationError>
Deserialize a value of type T from a byte slice containing DXB data
Source§impl<T> DatexValueContainerProxyInfallibleSerialize for Twhere
T: DatexValueProxyInfallibleSerialize,
impl<T> DatexValueContainerProxyInfallibleSerialize for Twhere
T: DatexValueProxyInfallibleSerialize,
fn to_value_container(self) -> ValueContainer
Source§impl<T> DatexValueContainerProxySerialize for Twhere
T: DatexValueProxySerialize,
impl<T> DatexValueContainerProxySerialize for Twhere
T: DatexValueProxySerialize,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T, U> TypeSubset<U> for Twhere
U: TypeSuperset<T>,
impl<T, U> TypeSubset<U> for Twhere
U: TypeSuperset<T>,
Source§fn is_subset_of(&self, other: &U) -> bool
fn is_subset_of(&self, other: &U) -> bool
Returns whether self is a subset of type