pub struct BoundChannel<M: MacBackend> { /* private fields */ }Expand description
A channel bound to a specific LocalNode. Implements Transport.
Holds a snapshot of the per-channel membership generation at creation
time. If the node leaves this channel, operations return
NodeError::ChannelLeft.
Implementations§
Source§impl<M: MacBackend> BoundChannel<M>
impl<M: MacBackend> BoundChannel<M>
Sourcepub fn peer(&self, key: PublicKey) -> PeerConnection<Self>
pub fn peer(&self, key: PublicKey) -> PeerConnection<Self>
Create a peer connection through this channel.
Trait Implementations§
Source§impl<M: Clone + MacBackend> Clone for BoundChannel<M>
impl<M: Clone + MacBackend> Clone for BoundChannel<M>
Source§fn clone(&self) -> BoundChannel<M>
fn clone(&self) -> BoundChannel<M>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M: MacBackend> Transport for BoundChannel<M>
Available on crate feature software-crypto only.
impl<M: MacBackend> Transport for BoundChannel<M>
Available on crate feature
software-crypto only.type Error = NodeError<M>
Source§async fn send(
&self,
to: &PublicKey,
payload: &[u8],
options: &SendOptions,
) -> Result<SendProgressTicket, Self::Error>
async fn send( &self, to: &PublicKey, payload: &[u8], options: &SendOptions, ) -> Result<SendProgressTicket, Self::Error>
Send a payload to a specific destination. Read more
Source§async fn send_all(
&self,
payload: &[u8],
options: &SendOptions,
) -> Result<SendProgressTicket, Self::Error>
async fn send_all( &self, payload: &[u8], options: &SendOptions, ) -> Result<SendProgressTicket, Self::Error>
Send a payload to all reachable nodes in this transport’s scope. Read more
Auto Trait Implementations§
impl<M> Freeze for BoundChannel<M>where
M: Freeze,
impl<M> !RefUnwindSafe for BoundChannel<M>
impl<M> !Send for BoundChannel<M>
impl<M> !Sync for BoundChannel<M>
impl<M> Unpin for BoundChannel<M>where
M: Unpin,
impl<M> !UnwindSafe for BoundChannel<M>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)