pub struct RelayConnection { /* private fields */ }Expand description
A generation-bound connection; dropping it removes its routes and pending work.
Implementations§
Source§impl RelayConnection
impl RelayConnection
Sourcepub fn mark_stream(
&self,
stream: u32,
peer: &str,
now: u64,
) -> Result<(), RelayRefusal>
pub fn mark_stream( &self, stream: u32, peer: &str, now: u64, ) -> Result<(), RelayRefusal>
Marks a non-control stream after deciding call on net.relay.
§Errors
Invalid peer or stream, missing grant, ended connection, duplicate stream or capacity.
Sourcepub fn receive(&self, frame: Frame, now: u64) -> Result<(), RelayRefusal>
pub fn receive(&self, frame: Frame, now: u64) -> Result<(), RelayRefusal>
Dispatches a marked stream before the keyed-link route can open it.
§Errors
An unmarked stream, unsolicited reply, ended connection, queue failure or poisoned state.
A refused LinkMessage is answered with PublishError on the sender’s stream.
Sourcepub fn disconnect(&self) -> Result<(), RelayRefusal>
pub fn disconnect(&self) -> Result<(), RelayRefusal>
Removes this exact connection and refuses unsettled frames without buffering.
§Errors
A remaining sender’s queue refused the disconnect notification, or state was poisoned.
Trait Implementations§
Source§impl Debug for RelayConnection
impl Debug for RelayConnection
Source§impl Drop for RelayConnection
impl Drop for RelayConnection
Auto Trait Implementations§
impl !RefUnwindSafe for RelayConnection
impl !UnwindSafe for RelayConnection
impl Freeze for RelayConnection
impl Send for RelayConnection
impl Sync for RelayConnection
impl Unpin for RelayConnection
impl UnsafeUnpin for RelayConnection
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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