pub struct CommandDispatchTransportBridge { /* private fields */ }Expand description
Bridge between stamped command envelopes and bounded station packet transport.
Implementations§
Source§impl CommandDispatchTransportBridge
impl CommandDispatchTransportBridge
Sourcepub const fn stats(&self) -> CommandDispatchTransportStats
pub const fn stats(&self) -> CommandDispatchTransportStats
Returns bridge statistics.
Sourcepub fn send_envelope<T>(
&mut self,
transport: &mut T,
source_station: StationId,
target_station: StationId,
command: &CommandEnvelope,
) -> Result<(), CommandDispatchTransportError<T::Error>>where
T: StationTransportSink,
pub fn send_envelope<T>(
&mut self,
transport: &mut T,
source_station: StationId,
target_station: StationId,
command: &CommandEnvelope,
) -> Result<(), CommandDispatchTransportError<T::Error>>where
T: StationTransportSink,
Encodes and sends a stamped command envelope to a station node.
Sourcepub fn send_frame<T>(
&mut self,
transport: &mut T,
source_station: StationId,
frame: &CommandDispatchFrame,
) -> Result<(), CommandDispatchTransportError<T::Error>>where
T: StationTransportSink,
pub fn send_frame<T>(
&mut self,
transport: &mut T,
source_station: StationId,
frame: &CommandDispatchFrame,
) -> Result<(), CommandDispatchTransportError<T::Error>>where
T: StationTransportSink,
Encodes and sends a command dispatch frame to its target station.
Sourcepub fn pump_target<T>(
&mut self,
transport: &mut T,
station_queues: &mut BTreeMap<StationId, CommandQueues>,
target_station: StationId,
max_packets: usize,
ingress: CommandIngress,
) -> Result<CommandDispatchPumpReport, CommandDispatchTransportError<T::Error>>where
T: StationTransportReceiver,
pub fn pump_target<T>(
&mut self,
transport: &mut T,
station_queues: &mut BTreeMap<StationId, CommandQueues>,
target_station: StationId,
max_packets: usize,
ingress: CommandIngress,
) -> Result<CommandDispatchPumpReport, CommandDispatchTransportError<T::Error>>where
T: StationTransportReceiver,
Receives up to max_packets for target_station, decodes command
dispatch frames, and enqueues stamped commands into station_queues.
Trait Implementations§
Source§impl Clone for CommandDispatchTransportBridge
impl Clone for CommandDispatchTransportBridge
Source§fn clone(&self) -> CommandDispatchTransportBridge
fn clone(&self) -> CommandDispatchTransportBridge
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandDispatchTransportBridge
impl Default for CommandDispatchTransportBridge
Source§fn default() -> CommandDispatchTransportBridge
fn default() -> CommandDispatchTransportBridge
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandDispatchTransportBridge
impl RefUnwindSafe for CommandDispatchTransportBridge
impl Send for CommandDispatchTransportBridge
impl Sync for CommandDispatchTransportBridge
impl Unpin for CommandDispatchTransportBridge
impl UnsafeUnpin for CommandDispatchTransportBridge
impl UnwindSafe for CommandDispatchTransportBridge
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