#[non_exhaustive]pub enum Response {
Greeting {
domain: String,
text: String,
},
Ehlo {
domain: String,
greet: Option<String>,
capabilities: Vec<Capability>,
},
Other {
code: ReplyCode,
lines: Vec<TextString<'static>>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl Response
impl Response
pub fn greeting<D, T>(domain: D, text: T) -> Response
pub fn ehlo<D, G>( domain: D, greet: Option<G>, capabilities: Vec<Capability>, ) -> Response
pub fn other<T>(code: ReplyCode, text: TextString<'static>) -> Response
pub fn serialize(&self, writer: &mut impl Write) -> Result<()>
Trait Implementations§
impl Eq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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