pub struct Goaway { /* private fields */ }Expand description
A GOAWAY: the sender intends to close the session soon and the peer should migrate its subscriptions elsewhere.
Implementations§
Source§impl Goaway
impl Goaway
Sourcepub fn redirect(uri: impl Into<String>) -> Self
pub fn redirect(uri: impl Into<String>) -> Self
Tell the peer to reconnect to uri.
The URI must carry whatever credentials the peer needs: it is dialed as given, and nothing from the current session is copied onto it.
Sourcepub fn with_timeout(self, timeout: Option<Duration>) -> Self
pub fn with_timeout(self, timeout: Option<Duration>) -> Self
Force-close the session with Error::GoawayTimeout if the peer is still
around after timeout, or never with None (the default).
Zero closes the session at once, without waiting for the GOAWAY to be written, so the peer may never receive it or its redirect URI; a redirect needs a nonzero timeout to arrive. Other values round up to the next millisecond and saturate at the wire’s 62-bit millisecond limit, so the local deadline agrees with what a moq-transport peer receives.
Trait Implementations§
impl Eq for Goaway
impl StructuralPartialEq for Goaway
Auto Trait Implementations§
impl Freeze for Goaway
impl RefUnwindSafe for Goaway
impl Send for Goaway
impl Sync for Goaway
impl Unpin for Goaway
impl UnsafeUnpin for Goaway
impl UnwindSafe for Goaway
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.