Struct ReplayTransport
pub struct ReplayTransport { /* private fields */ }Expand description
A Transport that replays recorded inbound frames and collects outbound
frames. See the module docs for gating and drain semantics.
Implementations§
§impl ReplayTransport
impl ReplayTransport
pub fn from_frames(frames: Vec<Vec<u8>>) -> (ReplayTransport, ReplayControl)
pub fn from_frames(frames: Vec<Vec<u8>>) -> (ReplayTransport, ReplayControl)
Build a replay transport from raw inbound frames.
The first frame should be the setupComplete handshake; it is
delivered ungated so the connection can reach Active.
pub fn from_wire_log(entries: &[WireEntry]) -> (ReplayTransport, ReplayControl)
pub fn from_wire_log(entries: &[WireEntry]) -> (ReplayTransport, ReplayControl)
Build a replay transport from a recorded wire log, keeping only the
WireDirection::Inbound entries (in log order).
pub fn with_ungated_prefix(self, n: usize) -> ReplayTransport
pub fn with_ungated_prefix(self, n: usize) -> ReplayTransport
Override how many leading frames are delivered before
ReplayControl::release (default 1: the setup handshake).
Trait Implementations§
§impl Transport for ReplayTransport
impl Transport for ReplayTransport
§fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_url: &'life1 str,
_headers: Vec<(String, String)>,
) -> Pin<Box<dyn Future<Output = Result<(), <ReplayTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ReplayTransport: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_url: &'life1 str,
_headers: Vec<(String, String)>,
) -> Pin<Box<dyn Future<Output = Result<(), <ReplayTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ReplayTransport: 'async_trait,
Connect to the given URL with optional headers.
§fn send<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), <ReplayTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ReplayTransport: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), <ReplayTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ReplayTransport: 'async_trait,
Send raw bytes.
Auto Trait Implementations§
impl Freeze for ReplayTransport
impl !RefUnwindSafe for ReplayTransport
impl Send for ReplayTransport
impl Sync for ReplayTransport
impl Unpin for ReplayTransport
impl !UnwindSafe for ReplayTransport
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