Skip to main content

Runtime

Struct Runtime 

Source
pub struct Runtime { /* private fields */ }

Implementations§

Source§

impl Runtime

publicly exposed wrapper impl for the Runtime around RuntimeInternal

Source

pub fn register_endpoint_property(&self, name: &str, value: ValueContainer)

Source

pub fn stub() -> Runtime

Source

pub async fn execute_dxb<'a>( &'a self, input: DXBWithSharedValues, initial_stack_values: Option<Vec<ValueContainer>>, execution_context: Option<impl Into<FinalOrPersistedExecutionContext<'a>> + 'a>, mark_as_debug: bool, ) -> Result<Option<ValueContainer>, ExecutionError>

Source

pub fn execute_dxb_sync<'a>( &'a self, input: DXBWithSharedValues, initial_stack_values: Option<Vec<ValueContainer>>, execution_context: Option<impl Into<FinalOrPersistedExecutionContext<'a>>>, ) -> Result<Option<ValueContainer>, ExecutionError>

Source

pub async fn execute_remote( &self, remote_execution_target: &RemoteExecutionTarget, input: DXBWithSharedValues, options: RemoteExecutionOptions, ) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>

Source

pub async fn execute_remote_single_receiver( &self, remote_execution_target: &RemoteExecutionTarget, input: DXBWithSharedValues, options: RemoteExecutionOptions, ) -> RemoteExecutionResult

Source

pub async fn execute_instructions_remote( &self, endpoints: Vec<Endpoint>, instructions_input: Vec<InstructionInput>, ) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>

Source

pub async fn execute_instructions_remote_single_receiver( &self, endpoint: Endpoint, instructions_input: Vec<InstructionInput>, mark_as_debug: bool, ) -> RemoteExecutionResult

Methods from Deref<Target = RuntimeInternal>§

Source

pub fn version(&self) -> Ref<'_, String>

Source

pub fn info(&self) -> Ref<'_, RuntimeInfo>

Source

pub fn config(&self) -> &RuntimeConfig

Source

pub unsafe fn set_config(&self, config: RuntimeConfig)

Updates the runtime config. This might not have the expected effect when the runtime is already running.

§Safety

The caller should only call this on an uninitialized runtime.

Source

pub fn reset_running_since(&self)

Updates the running_since timestamp in the runtime info to the current time.

Source

pub fn set_stats_provider(&self, stats_provider: fn() -> RuntimeStats)

Registers a new callback that provides RuntimeStats

Source

pub fn get_stats(&self) -> RuntimeStats

Source

pub fn com_hub(&self) -> Rc<ComHub>

Source

pub fn endpoint(&self) -> &Endpoint

Source

pub fn endpoint_properties( &self, ) -> Ref<'_, IndexMap<String, ValueContainer, RandomState>>

Source

pub fn endpoint_properties_mut( &self, ) -> RefMut<'_, IndexMap<String, ValueContainer, RandomState>>

Source

pub fn get_endpoint_property_by_name( &self, key: &str, ) -> Option<Ref<'_, ValueContainer>>

Source

pub fn get_endpoint_property_by_name_mut( &self, key: &str, ) -> Option<RefMut<'_, ValueContainer>>

Source

pub fn register_endpoint_property(&self, name: &str, value: ValueContainer)

Source

pub fn pointer_availability_lookup(&self) -> Ref<'_, PointerAvailabilityLookup>

Source

pub fn pointer_availability_lookup_mut( &self, ) -> RefMut<'_, PointerAvailabilityLookup>

Source

pub fn synced_value_data(&self) -> Ref<'_, SyncedValueData>

Source

pub fn synced_value_data_mut(&self) -> RefMut<'_, SyncedValueData>

Source

pub fn shared_references_cache_refcell(&self) -> &RefCell<SharedReferencesCache>

Source

pub fn shared_references_cache(&self) -> Ref<'_, SharedReferencesCache>

Source

pub fn shared_references_cache_mut(&self) -> RefMut<'_, SharedReferencesCache>

Source

pub fn core_library(&self) -> &CoreLibrary

Source

pub fn pointer_address_provider_mut( &self, ) -> RefMut<'_, SelfOwnedPointerAddressProvider>

Source

pub fn incoming_sections_receiver_mut( &self, ) -> RefMut<'_, IncomingSectionReceiver>

Source

pub fn com_interface_reconnect_request_receiver_mut( &self, ) -> RefMut<'_, UnboundedReceiver<ComInterfaceReconnectRequest>>

Source

pub fn task_manager(&self) -> &TaskManager

Source

pub fn execute_dxb<'a>( self: Rc<RuntimeInternal>, input: DXBWithSharedValues, initial_stack_values: Option<Vec<ValueContainer>>, execution_context: Option<impl Into<FinalOrPersistedExecutionContext<'a>> + 'a>, mark_as_debug: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<ValueContainer>, ExecutionError>> + 'a>>

Source

pub fn execute_dxb_sync<'a>( self: Rc<RuntimeInternal>, dxb: DXBWithSharedValues, initial_stack_values: Option<Vec<ValueContainer>>, execution_context: Option<impl Into<FinalOrPersistedExecutionContext<'a>>>, ) -> Result<Option<ValueContainer>, ExecutionError>

Source

pub async fn execute_remote_single_receiver( self: Rc<RuntimeInternal>, remote_execution_target: &RemoteExecutionTarget, input: DXBWithSharedValues, options: RemoteExecutionOptions, ) -> RemoteExecutionResult

Executes a remote block expecting a single receiver.

§Safety

The caller must ensure, to pass an remote execution context with a single receiver.

Source

pub async fn execute_remote( self: Rc<RuntimeInternal>, remote_execution_target: &RemoteExecutionTarget, input: DXBWithSharedValues, options: RemoteExecutionOptions, ) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>

Execute a remote block, waiting for all the peers to send their response. It might be, that a subset of the responses are errors

Source

pub async fn execute_instructions_remote( self: Rc<RuntimeInternal>, endpoints: Vec<Endpoint>, instructions_input: Vec<InstructionInput>, mark_as_debug: bool, ) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>

Source

pub async fn execute_instructions_remote_single_receiver( self: Rc<RuntimeInternal>, endpoint: Endpoint, instructions_input: Vec<InstructionInput>, mark_as_debug: bool, ) -> RemoteExecutionResult

Source

pub fn register_shared_containers_for_single_endpoint( self: Rc<Self>, endpoint: &Endpoint, shared_containers: Vec<SharedContainer>, )

Registers a list of shared containers for a single endpoint.

Source

pub unsafe fn register_shared_containers_for_endpoints( self: Rc<Self>, endpoints: &[&Endpoint], shared_containers: Vec<SharedContainer>, ) -> Result<(), SubscriberError>

Registers a list of shared containers for a list of endpoints to subscribe. Note: only self owned pointers are registered, others are skipped

§Safety

The caller must ensure that endpoints is not empty.

Source

pub fn get_env(&self) -> IndexMap<String, String, RandomState>

Source

pub fn get_name(&self) -> Option<String>

Get the human-readable name of the endpoint (can be provided in config)

Source

pub fn create_dif_interface(&self) -> DIFInterface

Creates a new DIFInterface with a unique transceiver id and the runtime’s pointer address provider

Source

pub fn log_info<S: AsRef<str>>(&self, message: S)

Logs an info message with the runtime’s endpoint as a prefix.

Source

pub fn log_error<S: AsRef<str>>(&self, message: S)

Logs an error message with the runtime’s endpoint as a prefix.

Source

pub fn log_debug<S: AsRef<str>>(&self, message: S)

Logs a debug message with the runtime’s endpoint as a prefix.

Source

pub fn log_warn<S: AsRef<str>>(&self, message: S)

Logs a warning message with the runtime’s endpoint as a prefix.

Source

pub fn sync_value_with_owner( self: Rc<Self>, shared_container: &SharedContainer, ) -> Result<(), SubscriberError>

Sends local value updates back to the owner of a (remote) shared container. If the container is not mutable, this function does nothing.

Source

pub unsafe fn subscribe_endpoint_to_owned_value( self: Rc<Self>, shared_container: &SharedContainer, endpoint: &Endpoint, access_rights: ReferenceMutability, ) -> Result<(), ObserverError>

Subscribes an endpoint to a self-owned shared container with the specified access rights.

§Safety

The caller must ensure that the shared container is self-owned.

Trait Implementations§

Source§

impl Clone for Runtime

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Runtime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for Runtime

Source§

type Target = RuntimeInternal

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<Rc<RuntimeInternal>> for Runtime

Source§

fn from(value: Rc<RuntimeInternal>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> DynEq for T
where T: Any,

Source§

default fn dyn_eq(&self, _other: &(dyn Any + 'static)) -> bool

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryClone for T

Source§

default fn try_clone(&self) -> Result<Value, ()>

Attempts to clone Self into a new Value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TypeSubset<U> for T
where U: TypeSuperset<T>,

Source§

fn is_subset_of(&self, other: &U) -> bool

Returns whether self is a subset of type