pub(super) struct GoAway {
close_now: bool,
going_away: Option<GoingAway>,
is_user_initiated: bool,
pending: Option<GoAway>,
}
Expand description
Manages our sending of GOAWAY frames.
Fields§
§close_now: bool
Whether the connection should close now, or wait until idle.
going_away: Option<GoingAway>
Records if we’ve sent any GOAWAY before.
is_user_initiated: bool
Whether the user started the GOAWAY by calling abrupt_shutdown
.
pending: Option<GoAway>
A GOAWAY frame that must be buffered in the Codec immediately.
Implementations§
source§impl GoAway
impl GoAway
pub fn new() -> Self
sourcepub fn go_away(&mut self, f: GoAway)
pub fn go_away(&mut self, f: GoAway)
Enqueue a GOAWAY frame to be written.
The connection is expected to continue to run until idle.
pub fn go_away_now(&mut self, f: GoAway)
pub fn go_away_from_user(&mut self, f: GoAway)
sourcepub fn is_going_away(&self) -> bool
pub fn is_going_away(&self) -> bool
Return if a GOAWAY has ever been scheduled.
pub fn is_user_initiated(&self) -> bool
sourcepub fn going_away(&self) -> Option<&GoingAway>
pub fn going_away(&self) -> Option<&GoingAway>
Returns the going away info, if any.
sourcepub fn should_close_now(&self) -> bool
pub fn should_close_now(&self) -> bool
Returns if the connection should close now, or wait until idle.
sourcepub fn should_close_on_idle(&self) -> bool
pub fn should_close_on_idle(&self) -> bool
Returns if the connection should be closed when idle.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GoAway
impl RefUnwindSafe for GoAway
impl Send for GoAway
impl Sync for GoAway
impl Unpin 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
Mutably borrows from an owned value. Read more