Struct imap_types::response::Bye
source · pub struct Bye<'a> {
pub code: Option<Code<'a>>,
pub text: Text<'a>,
}Expand description
Indicates that the server is about to close the connection.
The BYE response is sent under one of four conditions:
-
as part of a normal logout sequence. The server will close the connection after sending the tagged OK response to the LOGOUT command.
-
as a panic shutdown announcement. The server closes the connection immediately.
-
as an announcement of an inactivity autologout. The server closes the connection immediately.
-
as one of three possible greetings at connection startup, indicating that the server is not willing to accept a connection from this client. The server closes the connection immediately.
The difference between a BYE that occurs as part of a normal LOGOUT sequence (the first case) and a BYE that occurs because of a failure (the other three cases) is that the connection closes immediately in the failure case. In all cases the client SHOULD continue to read response data from the server until the connection is closed; this will ensure that any pending untagged or completion responses are read and processed.
Fields§
§code: Option<Code<'a>>§text: Text<'a>Trait Implementations§
source§impl<'de, 'a> Deserialize<'de> for Bye<'a>
impl<'de, 'a> Deserialize<'de> for Bye<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<'a> IntoBoundedStatic for Bye<'a>
impl<'a> IntoBoundedStatic for Bye<'a>
source§impl<'a> PartialEq for Bye<'a>
impl<'a> PartialEq for Bye<'a>
source§impl<'a> ToBoundedStatic for Bye<'a>
impl<'a> ToBoundedStatic for Bye<'a>
impl<'a> Eq for Bye<'a>
impl<'a> StructuralPartialEq for Bye<'a>
Auto Trait Implementations§
impl<'a> Freeze for Bye<'a>
impl<'a> RefUnwindSafe for Bye<'a>
impl<'a> Send for Bye<'a>
impl<'a> Sync for Bye<'a>
impl<'a> Unpin for Bye<'a>
impl<'a> UnwindSafe for Bye<'a>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)