pub struct RuntimeExtensions { /* private fields */ }Expand description
Shared runtime extensions consumed by sessions and protocol drivers.
Implementations§
Source§impl RuntimeExtensions
impl RuntimeExtensions
Sourcepub fn add_device_layer(&mut self, layer: Arc<dyn DevicePortLayer>)
pub fn add_device_layer(&mut self, layer: Arc<dyn DevicePortLayer>)
Appends a device-layer decorator.
Sourcepub fn insert_protocol_config(
&mut self,
protocol: impl Into<String>,
value: JsonValue,
)
pub fn insert_protocol_config( &mut self, protocol: impl Into<String>, value: JsonValue, )
Inserts a protocol-scoped configuration payload.
Sourcepub fn protocol_config(&self, protocol: &str) -> Option<&JsonValue>
pub fn protocol_config(&self, protocol: &str) -> Option<&JsonValue>
Returns a protocol-scoped configuration payload.
Sourcepub fn decorate_device_port(
&self,
protocol: Option<Protocol>,
port: DynDevicePort,
) -> DynDevicePort
pub fn decorate_device_port( &self, protocol: Option<Protocol>, port: DynDevicePort, ) -> DynDevicePort
Applies all registered device layers in insertion order.
Trait Implementations§
Source§impl Clone for RuntimeExtensions
impl Clone for RuntimeExtensions
Source§fn clone(&self) -> RuntimeExtensions
fn clone(&self) -> RuntimeExtensions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for RuntimeExtensions
impl Default for RuntimeExtensions
Source§fn default() -> RuntimeExtensions
fn default() -> RuntimeExtensions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuntimeExtensions
impl !RefUnwindSafe for RuntimeExtensions
impl Send for RuntimeExtensions
impl Sync for RuntimeExtensions
impl Unpin for RuntimeExtensions
impl UnsafeUnpin for RuntimeExtensions
impl !UnwindSafe for RuntimeExtensions
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