pub struct Runtime { /* private fields */ }Implementations§
Source§impl Runtime
publicly exposed wrapper impl for the Runtime
around RuntimeInternal
impl Runtime
publicly exposed wrapper impl for the Runtime around RuntimeInternal
pub fn register_endpoint_property(&self, name: &str, value: ValueContainer)
pub fn stub() -> Runtime
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>
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>
pub async fn execute_remote( &self, remote_execution_target: &RemoteExecutionTarget, input: DXBWithSharedValues, options: RemoteExecutionOptions, ) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>
pub async fn execute_remote_single_receiver( &self, remote_execution_target: &RemoteExecutionTarget, input: DXBWithSharedValues, options: RemoteExecutionOptions, ) -> RemoteExecutionResult
pub async fn execute_instructions_remote( &self, endpoints: Vec<Endpoint>, instructions_input: Vec<InstructionInput>, ) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>
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>§
pub fn version(&self) -> Ref<'_, String>
pub fn info(&self) -> Ref<'_, RuntimeInfo>
pub fn config(&self) -> &RuntimeConfig
Sourcepub unsafe fn set_config(&self, config: RuntimeConfig)
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.
Sourcepub fn reset_running_since(&self)
pub fn reset_running_since(&self)
Updates the running_since timestamp in the runtime info to the current time.
Sourcepub fn set_stats_provider(&self, stats_provider: fn() -> RuntimeStats)
pub fn set_stats_provider(&self, stats_provider: fn() -> RuntimeStats)
Registers a new callback that provides RuntimeStats
pub fn get_stats(&self) -> RuntimeStats
pub fn com_hub(&self) -> Rc<ComHub>
pub fn endpoint(&self) -> &Endpoint
pub fn endpoint_properties( &self, ) -> Ref<'_, IndexMap<String, ValueContainer, RandomState>>
pub fn endpoint_properties_mut( &self, ) -> RefMut<'_, IndexMap<String, ValueContainer, RandomState>>
pub fn get_endpoint_property_by_name( &self, key: &str, ) -> Option<Ref<'_, ValueContainer>>
pub fn get_endpoint_property_by_name_mut( &self, key: &str, ) -> Option<RefMut<'_, ValueContainer>>
pub fn register_endpoint_property(&self, name: &str, value: ValueContainer)
pub fn pointer_availability_lookup(&self) -> Ref<'_, PointerAvailabilityLookup>
pub fn pointer_availability_lookup_mut( &self, ) -> RefMut<'_, PointerAvailabilityLookup>
pub fn synced_value_data(&self) -> Ref<'_, SyncedValueData>
pub fn synced_value_data_mut(&self) -> RefMut<'_, SyncedValueData>
pub fn core_library(&self) -> &CoreLibrary
pub fn pointer_address_provider_mut( &self, ) -> RefMut<'_, SelfOwnedPointerAddressProvider>
pub fn incoming_sections_receiver_mut( &self, ) -> RefMut<'_, IncomingSectionReceiver>
pub fn com_interface_reconnect_request_receiver_mut( &self, ) -> RefMut<'_, UnboundedReceiver<ComInterfaceReconnectRequest>>
pub fn task_manager(&self) -> &TaskManager
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>>
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>
Sourcepub async fn execute_remote_single_receiver(
self: Rc<RuntimeInternal>,
remote_execution_target: &RemoteExecutionTarget,
input: DXBWithSharedValues,
options: RemoteExecutionOptions,
) -> RemoteExecutionResult
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.
Sourcepub async fn execute_remote(
self: Rc<RuntimeInternal>,
remote_execution_target: &RemoteExecutionTarget,
input: DXBWithSharedValues,
options: RemoteExecutionOptions,
) -> Result<Vec<(RemoteExecutionResult, Endpoint)>, SubscriberError>
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
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>
pub async fn execute_instructions_remote_single_receiver( self: Rc<RuntimeInternal>, endpoint: Endpoint, instructions_input: Vec<InstructionInput>, mark_as_debug: bool, ) -> RemoteExecutionResult
Registers a list of shared containers for a single endpoint.
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.
pub fn get_env(&self) -> IndexMap<String, String, RandomState>
Sourcepub fn get_name(&self) -> Option<String>
pub fn get_name(&self) -> Option<String>
Get the human-readable name of the endpoint (can be provided in config)
Sourcepub fn create_dif_interface(&self) -> DIFInterface
pub fn create_dif_interface(&self) -> DIFInterface
Creates a new DIFInterface with a unique transceiver id and the runtime’s pointer address provider
Sourcepub fn log_info<S: AsRef<str>>(&self, message: S)
pub fn log_info<S: AsRef<str>>(&self, message: S)
Logs an info message with the runtime’s endpoint as a prefix.
Sourcepub fn log_error<S: AsRef<str>>(&self, message: S)
pub fn log_error<S: AsRef<str>>(&self, message: S)
Logs an error message with the runtime’s endpoint as a prefix.
Sourcepub fn log_debug<S: AsRef<str>>(&self, message: S)
pub fn log_debug<S: AsRef<str>>(&self, message: S)
Logs a debug message with the runtime’s endpoint as a prefix.
Sourcepub fn log_warn<S: AsRef<str>>(&self, message: S)
pub fn log_warn<S: AsRef<str>>(&self, message: S)
Logs a warning message with the runtime’s endpoint as a prefix.
Sourcepub fn sync_value_with_owner(
self: Rc<Self>,
shared_container: &SharedContainer,
) -> Result<(), SubscriberError>
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.
Sourcepub unsafe fn subscribe_endpoint_to_owned_value(
self: Rc<Self>,
shared_container: &SharedContainer,
endpoint: &Endpoint,
access_rights: ReferenceMutability,
) -> Result<(), ObserverError>
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§
Auto Trait Implementations§
impl !RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl !UnwindSafe for Runtime
impl Forget for Runtime
impl Freeze for Runtime
impl Move for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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