pub struct ClientTransportBridge { /* private fields */ }Expand description
Low-level bridge for client command send and client-bound frame receive.
Implementations§
Source§impl ClientTransportBridge
impl ClientTransportBridge
Sourcepub const fn new(config: ClientTransportConfig) -> Self
pub const fn new(config: ClientTransportConfig) -> Self
Creates a client transport bridge.
Sourcepub const fn config(&self) -> ClientTransportConfig
pub const fn config(&self) -> ClientTransportConfig
Returns configuration.
Sourcepub const fn stats(&self) -> ClientTransportStats
pub const fn stats(&self) -> ClientTransportStats
Returns accumulated statistics.
Sourcepub fn send_command_frame<T>(
&mut self,
transport: &mut T,
frame: &CommandFrame,
) -> Result<ClientCommandSendReport, ClientTransportBridgeError<T::Error>>where
T: TransportSink,
pub fn send_command_frame<T>(
&mut self,
transport: &mut T,
frame: &CommandFrame,
) -> Result<ClientCommandSendReport, ClientTransportBridgeError<T::Error>>where
T: TransportSink,
Encodes and sends a client command frame to the configured server id.
Sourcepub fn pump_owned<T>(
&mut self,
transport: &mut T,
max_packets: usize,
) -> Result<ClientTransportPump, ClientTransportBridgeError<T::Error>>where
T: TransportReceiver,
pub fn pump_owned<T>(
&mut self,
transport: &mut T,
max_packets: usize,
) -> Result<ClientTransportPump, ClientTransportBridgeError<T::Error>>where
T: TransportReceiver,
Receives and decodes up to max_packets client-bound frames.
Sourcepub fn pump<T, F, V>(
&mut self,
transport: &mut T,
max_packets: usize,
visitor: F,
) -> Result<ClientTransportVisitReport, ClientTransportVisitError<T::Error, V>>
pub fn pump<T, F, V>( &mut self, transport: &mut T, max_packets: usize, visitor: F, ) -> Result<ClientTransportVisitReport, ClientTransportVisitError<T::Error, V>>
Receives mixed client-bound frames and visits them without materializing nested replication frame storage.
ACK and barrier values are copied into the visitor enum. Replication component bytes borrow the current transport packet and must be consumed before the visitor returns. Accepted statistics are recorded before visitor invocation and are not rolled back if the visitor fails.
Trait Implementations§
Source§impl Clone for ClientTransportBridge
impl Clone for ClientTransportBridge
Source§fn clone(&self) -> ClientTransportBridge
fn clone(&self) -> ClientTransportBridge
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 moreAuto Trait Implementations§
impl Freeze for ClientTransportBridge
impl RefUnwindSafe for ClientTransportBridge
impl Send for ClientTransportBridge
impl Sync for ClientTransportBridge
impl Unpin for ClientTransportBridge
impl UnsafeUnpin for ClientTransportBridge
impl UnwindSafe for ClientTransportBridge
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