Struct imap_types::response::Greeting
source · pub struct Greeting<'a> {
pub kind: GreetingKind,
pub code: Option<Code<'a>>,
pub text: Text<'a>,
}
Expand description
An IMAP greeting.
Note: Don’t use code: None
and a text
that starts with “[” as this would be ambiguous in IMAP.
Fields§
§kind: GreetingKind
§code: Option<Code<'a>>
§text: Text<'a>
Implementations§
source§impl<'a> Greeting<'a>
impl<'a> Greeting<'a>
pub fn new( kind: GreetingKind, code: Option<Code<'a>>, text: &'a str ) -> Result<Self, TextError>
pub fn ok(code: Option<Code<'a>>, text: &'a str) -> Result<Self, TextError>
pub fn preauth(code: Option<Code<'a>>, text: &'a str) -> Result<Self, TextError>
pub fn bye(code: Option<Code<'a>>, text: &'a str) -> Result<Self, TextError>
Trait Implementations§
source§impl<'a> Arbitrary<'a> for Greeting<'a>
impl<'a> Arbitrary<'a> for Greeting<'a>
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl<'de, 'a> Deserialize<'de> for Greeting<'a>
impl<'de, 'a> Deserialize<'de> for Greeting<'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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> IntoBoundedStatic for Greeting<'a>
impl<'a> IntoBoundedStatic for Greeting<'a>
source§impl<'a> PartialEq<Greeting<'a>> for Greeting<'a>
impl<'a> PartialEq<Greeting<'a>> for Greeting<'a>
source§impl<'a> ToBoundedStatic for Greeting<'a>
impl<'a> ToBoundedStatic for Greeting<'a>
impl<'a> Eq for Greeting<'a>
impl<'a> StructuralEq for Greeting<'a>
impl<'a> StructuralPartialEq for Greeting<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Greeting<'a>
impl<'a> Send for Greeting<'a>
impl<'a> Sync for Greeting<'a>
impl<'a> Unpin for Greeting<'a>
impl<'a> UnwindSafe for Greeting<'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
Mutably borrows from an owned value. Read more