pub struct InMemoryTransport { /* private fields */ }Expand description
A pair of in-memory channels for testing sync without real I/O.
Create with [InMemoryTransport::pair], which returns two transports
connected to each other: what one sends, the other receives.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryTransport
impl Debug for InMemoryTransport
Source§impl SyncTransport for InMemoryTransport
impl SyncTransport for InMemoryTransport
Source§type Error = InMemoryError
type Error = InMemoryError
Error type for transport operations.
Source§fn send_hash(&mut self, hash: &Hash) -> Result<(), Self::Error>
fn send_hash(&mut self, hash: &Hash) -> Result<(), Self::Error>
Send a root hash to the remote. Read more
Source§fn recv_hash(&mut self) -> Result<Hash, Self::Error>
fn recv_hash(&mut self) -> Result<Hash, Self::Error>
Receive a root hash from the remote. Read more
Source§fn send_event_hashes(&mut self, hashes: &[String]) -> Result<(), Self::Error>
fn send_event_hashes(&mut self, hashes: &[String]) -> Result<(), Self::Error>
Send a list of event hashes that we want the remote to check. Read more
Source§fn recv_event_hashes(&mut self) -> Result<Vec<String>, Self::Error>
fn recv_event_hashes(&mut self) -> Result<Vec<String>, Self::Error>
Receive a list of event hashes from the remote. Read more
Auto Trait Implementations§
impl Freeze for InMemoryTransport
impl RefUnwindSafe for InMemoryTransport
impl Send for InMemoryTransport
impl Sync for InMemoryTransport
impl Unpin for InMemoryTransport
impl UnsafeUnpin for InMemoryTransport
impl UnwindSafe for InMemoryTransport
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