pub enum CallableBody {
Native(NativeCallable),
DatexBytecode(DatexBytecodeCallable),
CoreStub(CoreStub),
Hidden,
}Variants§
Native(NativeCallable)
A callable implemented in native Rust code.
DatexBytecode(DatexBytecodeCallable)
A callable implemented in Datex bytecode.
CoreStub(CoreStub)
A callable that is a stub for core library functions that are implemented in the runtime.
Hidden
A callable that is hidden and cannot be called directly (normally a callable that exists on a remote endpoint behind a shared value)
Implementations§
Source§impl CallableBody
impl CallableBody
pub fn native_sync( native_callable: impl Fn(Vec<ApplyArgument>, &Runtime) -> Result<(Option<ValueContainer>, Vec<ValueContainer>), CallableError> + 'static, ) -> Self
pub fn native_async( native_callable: impl Fn(Vec<ApplyArgument>, &Runtime) -> Pin<Box<dyn Future<Output = Result<(Option<ValueContainer>, Vec<ValueContainer>), CallableError>> + 'static>> + 'static, ) -> Self
pub fn requires_async(&self) -> bool
Trait Implementations§
Source§impl Clone for CallableBody
impl Clone for CallableBody
Source§impl Debug for CallableBody
impl Debug for CallableBody
impl Eq for CallableBody
Source§impl Hash for CallableBody
impl Hash for CallableBody
Source§impl PartialEq for CallableBody
impl PartialEq for CallableBody
impl StructuralPartialEq for CallableBody
Auto Trait Implementations§
impl !RefUnwindSafe for CallableBody
impl !Send for CallableBody
impl !Sync for CallableBody
impl !UnwindSafe for CallableBody
impl Forget for CallableBody
impl Freeze for CallableBody
impl Move for CallableBody
impl Unpin for CallableBody
impl UnsafeUnpin for CallableBody
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§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