pub struct Receiver { /* private fields */ }
Expand description
Type which receives messages sent over the network sent by a Transmitter.
Implementations§
source§impl Receiver
impl Receiver
sourcepub fn new<C: 'static + Creds + Send + Sync, F: 'static + MsgCallback>(
ip_addr: IpAddr,
creds: Arc<C>,
callback: F
) -> Result<Receiver>
pub fn new<C: 'static + Creds + Send + Sync, F: 'static + MsgCallback>( ip_addr: IpAddr, creds: Arc<C>, callback: F ) -> Result<Receiver>
Returns a Receiver bound to the given IpAddr which receives messages at the bind path of the Writecap in the given credentials. The returned type can be used to make Transmitters for any path.
sourcepub async fn transmitter(&self, addr: Arc<BlockAddr>) -> Result<Transmitter>
pub async fn transmitter(&self, addr: Arc<BlockAddr>) -> Result<Transmitter>
Creates a Transmitter which is connected to the given address.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Receiver
impl Send for Receiver
impl Sync for Receiver
impl Unpin for Receiver
impl !UnwindSafe for Receiver
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