pub struct FakeTransport { /* private fields */ }Expand description
Fake transport for benchmarks and tests.
Implementations§
Source§impl FakeTransport
impl FakeTransport
Sourcepub const fn packets_sent(&self) -> usize
pub const fn packets_sent(&self) -> usize
Returns sent packet count.
Sourcepub const fn bytes_sent(&self) -> usize
pub const fn bytes_sent(&self) -> usize
Returns sent byte count.
Sourcepub const fn batches_sent(&self) -> usize
pub const fn batches_sent(&self) -> usize
Returns sent batch count.
Trait Implementations§
Source§impl Clone for FakeTransport
impl Clone for FakeTransport
Source§fn clone(&self) -> FakeTransport
fn clone(&self) -> FakeTransport
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 Debug for FakeTransport
impl Debug for FakeTransport
Source§impl Default for FakeTransport
impl Default for FakeTransport
Source§fn default() -> FakeTransport
fn default() -> FakeTransport
Returns the “default value” for a type. Read more
impl Eq for FakeTransport
Source§impl PartialEq for FakeTransport
impl PartialEq for FakeTransport
impl StructuralPartialEq for FakeTransport
Source§impl TransportSink for FakeTransport
impl TransportSink for FakeTransport
Source§type Error = Infallible
type Error = Infallible
Transport error type.
Source§fn send(&mut self, packet: OutboundPacket) -> Result<(), Self::Error>
fn send(&mut self, packet: OutboundPacket) -> Result<(), Self::Error>
Sends one encoded packet.
Source§fn send_batch(&mut self, batch: PacketBatch) -> Result<(), Self::Error>
fn send_batch(&mut self, batch: PacketBatch) -> Result<(), Self::Error>
Sends a packet batch.
Auto Trait Implementations§
impl Freeze for FakeTransport
impl RefUnwindSafe for FakeTransport
impl Send for FakeTransport
impl Sync for FakeTransport
impl Unpin for FakeTransport
impl UnsafeUnpin for FakeTransport
impl UnwindSafe for FakeTransport
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