pub struct TestTransport {
pub local_address: Address,
pub registry: Arc<TestRegistry>,
/* private fields */
}Expand description
A TestTransport lets multiple Address participants exchange
AkkaPdu frames without going through the network.
Fields§
§local_address: Address§registry: Arc<TestRegistry>Implementations§
Trait Implementations§
Source§impl Clone for TestTransport
impl Clone for TestTransport
Source§fn clone(&self) -> TestTransport
fn clone(&self) -> TestTransport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Transport for TestTransport
impl Transport for TestTransport
Source§fn listen<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn listen<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Address, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bind a listener and return the local
Address.Source§fn associate<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn associate<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open (or reuse) an outbound association to
target.Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 Address,
pdu: AkkaPdu,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
target: &'life1 Address,
pdu: AkkaPdu,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a single PDU to the peer at
target. Implementations are
expected to associate lazily if needed.Source§fn inbound(&self) -> UnboundedReceiver<InboundFrame>
fn inbound(&self) -> UnboundedReceiver<InboundFrame>
Take ownership of the inbound stream. Calling more than once
returns an empty channel.
Auto Trait Implementations§
impl Freeze for TestTransport
impl !RefUnwindSafe for TestTransport
impl Send for TestTransport
impl Sync for TestTransport
impl Unpin for TestTransport
impl UnsafeUnpin for TestTransport
impl !UnwindSafe for TestTransport
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