pub struct RuntimeInternal {
pub memory: RefCell<Memory>,
pub com_hub: Rc<ComHub>,
pub endpoint: Endpoint,
pub config: RuntimeConfig,
pub task_manager: TaskManager,
pub execution_contexts: RefCell<HashMap<IncomingEndpointContextSectionId, ExecutionContext>>,
/* private fields */
}Fields§
§memory: RefCell<Memory>§com_hub: Rc<ComHub>§endpoint: Endpoint§config: RuntimeConfig§task_manager: TaskManager§execution_contexts: RefCell<HashMap<IncomingEndpointContextSectionId, ExecutionContext>>active execution contexts, stored by context_id
Implementations§
Source§impl RuntimeInternal
impl RuntimeInternal
pub fn execute_dxb<'a>( self_rc: Rc<RuntimeInternal>, dxb: Vec<u8>, execution_context: Option<&'a mut ExecutionContext>, _end_execution: bool, ) -> Pin<Box<dyn Future<Output = Result<Option<ValueContainer>, ExecutionError>> + 'a>>
pub fn execute_dxb_sync( self_rc: Rc<RuntimeInternal>, dxb: &[u8], execution_context: Option<&mut ExecutionContext>, _end_execution: bool, ) -> Result<Option<ValueContainer>, ExecutionError>
pub async fn execute_remote( self_rc: Rc<RuntimeInternal>, remote_execution_context: &mut RemoteExecutionContext, dxb: Vec<u8>, ) -> Result<Option<ValueContainer>, ExecutionError>
pub fn get_env(&self) -> HashMap<String, String>
Trait Implementations§
Source§impl DIFInterface for RuntimeInternal
impl DIFInterface for RuntimeInternal
Source§fn update(
&self,
source_id: TransceiverId,
address: PointerAddress,
update: &DIFUpdateData,
) -> Result<(), DIFUpdateError>
fn update( &self, source_id: TransceiverId, address: PointerAddress, update: &DIFUpdateData, ) -> Result<(), DIFUpdateError>
Applies a DIF update to the value at the given pointer address.
Source§fn apply(
&self,
_callee: DIFValueContainer,
_value: DIFValueContainer,
) -> Result<DIFValueContainer, DIFApplyError>
fn apply( &self, _callee: DIFValueContainer, _value: DIFValueContainer, ) -> Result<DIFValueContainer, DIFApplyError>
Executes an apply operation, applying the
value to the callee.Source§fn create_pointer(
&self,
value: DIFValueContainer,
allowed_type: Option<DIFTypeDefinition>,
mutability: ReferenceMutability,
) -> Result<PointerAddress, DIFCreatePointerError>
fn create_pointer( &self, value: DIFValueContainer, allowed_type: Option<DIFTypeDefinition>, mutability: ReferenceMutability, ) -> Result<PointerAddress, DIFCreatePointerError>
Creates a new pointer and stores it in memory.
Returns the address of the newly created pointer.
Source§async fn resolve_pointer_address_external(
&self,
address: PointerAddress,
) -> Result<DIFReference, DIFResolveReferenceError>
async fn resolve_pointer_address_external( &self, address: PointerAddress, ) -> Result<DIFReference, DIFResolveReferenceError>
Resolves a pointer address of a pointer that may not be in memory.
If the pointer is not in memory, it will be loaded from external storage.
Source§fn resolve_pointer_address_in_memory(
&self,
address: PointerAddress,
) -> Result<DIFReference, DIFResolveReferenceError>
fn resolve_pointer_address_in_memory( &self, address: PointerAddress, ) -> Result<DIFReference, DIFResolveReferenceError>
Resolves a pointer address of a pointer that is currently in memory.
Returns an error if the pointer is not found in memory.
Source§fn observe_pointer(
&self,
transceiver_id: TransceiverId,
address: PointerAddress,
options: ObserveOptions,
callback: impl Fn(&DIFUpdateData, TransceiverId) + 'static,
) -> Result<u32, DIFObserveError>
fn observe_pointer( &self, transceiver_id: TransceiverId, address: PointerAddress, options: ObserveOptions, callback: impl Fn(&DIFUpdateData, TransceiverId) + 'static, ) -> Result<u32, DIFObserveError>
Starts observing changes to the pointer at the given address.
As long as the pointer is observed, it will not be garbage collected.
Source§fn update_observer_options(
&self,
address: PointerAddress,
observer_id: u32,
options: ObserveOptions,
) -> Result<(), DIFObserveError>
fn update_observer_options( &self, address: PointerAddress, observer_id: u32, options: ObserveOptions, ) -> Result<(), DIFObserveError>
Updates the options for an existing observer on the pointer at the given address.
If the observer does not exist, an error is returned.
Source§fn unobserve_pointer(
&self,
address: PointerAddress,
observer_id: u32,
) -> Result<(), DIFObserveError>
fn unobserve_pointer( &self, address: PointerAddress, observer_id: u32, ) -> Result<(), DIFObserveError>
Stops observing changes to the pointer at the given address.
If no other references to the pointer exist, it may be garbage collected after this call.
Auto Trait Implementations§
impl !Freeze for RuntimeInternal
impl !RefUnwindSafe for RuntimeInternal
impl !Send for RuntimeInternal
impl !Sync for RuntimeInternal
impl Unpin for RuntimeInternal
impl UnsafeUnpin for RuntimeInternal
impl !UnwindSafe for RuntimeInternal
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> 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