pub struct RuntimeInternal {
pub memory: RefCell<Memory>,
pub com_hub: ComHub,
pub endpoint: Endpoint,
pub config: RuntimeConfig,
pub execution_contexts: RefCell<HashMap<IncomingEndpointContextSectionId, ExecutionContext>>,
/* private fields */
}Fields§
§memory: RefCell<Memory>§com_hub: ComHub§endpoint: Endpoint§config: RuntimeConfig§execution_contexts: RefCell<HashMap<IncomingEndpointContextSectionId, ExecutionContext>>active execution contexts, stored by context_id
Implementations§
Source§impl RuntimeInternal
impl RuntimeInternal
Sourcepub fn start_update_loop(self_rc: Rc<RuntimeInternal>)
pub fn start_update_loop(self_rc: Rc<RuntimeInternal>)
Starts the
Sourcepub async fn stop_update_loop(self_rc: Rc<RuntimeInternal>)
pub async fn stop_update_loop(self_rc: Rc<RuntimeInternal>)
Stops the update loop for the Runtime, if it is running.
Source§impl RuntimeInternal
impl RuntimeInternal
pub async fn execute( self_rc: Rc<RuntimeInternal>, script: &str, inserted_values: &[ValueContainer], execution_context: Option<&mut ExecutionContext>, ) -> Result<Option<ValueContainer>, ScriptExecutionError>
pub fn execute_sync( self_rc: Rc<RuntimeInternal>, script: &str, inserted_values: &[ValueContainer], execution_context: Option<&mut ExecutionContext>, ) -> Result<Option<ValueContainer>, ScriptExecutionError>
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>
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>
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>
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>
Source§fn apply(
&self,
callee: DIFValueContainer,
value: DIFValueContainer,
) -> Result<DIFValueContainer, DIFApplyError>
fn apply( &self, callee: DIFValueContainer, value: DIFValueContainer, ) -> Result<DIFValueContainer, DIFApplyError>
value to the callee.Source§fn create_pointer(
&self,
value: DIFValueContainer,
allowed_type: Option<DIFTypeContainer>,
mutability: ReferenceMutability,
) -> Result<PointerAddress, DIFCreatePointerError>
fn create_pointer( &self, value: DIFValueContainer, allowed_type: Option<DIFTypeContainer>, mutability: ReferenceMutability, ) -> Result<PointerAddress, DIFCreatePointerError>
Source§fn observe_pointer<F: Fn(&DIFUpdate) + 'static>(
&self,
transceiver_id: TransceiverId,
address: PointerAddress,
options: ObserveOptions,
callback: F,
) -> Result<u32, DIFObserveError>
fn observe_pointer<F: Fn(&DIFUpdate) + 'static>( &self, transceiver_id: TransceiverId, address: PointerAddress, options: ObserveOptions, callback: F, ) -> Result<u32, DIFObserveError>
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>
Source§fn unobserve_pointer(
&self,
address: PointerAddress,
observer_id: u32,
) -> Result<(), DIFObserveError>
fn unobserve_pointer( &self, address: PointerAddress, observer_id: u32, ) -> Result<(), DIFObserveError>
Source§impl Debug for RuntimeInternal
impl Debug for RuntimeInternal
Auto Trait Implementations§
impl !Freeze for RuntimeInternal
impl !RefUnwindSafe for RuntimeInternal
impl !Send for RuntimeInternal
impl !Sync for RuntimeInternal
impl Unpin for RuntimeInternal
impl !UnwindSafe for RuntimeInternal
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);