Struct vsmtp_protocol::Writer
pub struct Writer<W: AsyncWrite + Unpin + Send> { /* private fields */ }
Expand description
Sink for sending reply to the client
Implementations§
§impl<W: AsyncWrite + Unpin + Send> Writer<W>
impl<W: AsyncWrite + Unpin + Send> Writer<W>
pub const fn new(inner: W) -> Self
pub const fn new(inner: W) -> Self
Create a new instance
pub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consume the instance and return the underlying writer.
pub async fn write_all_bytes(&mut self, buffer: &[u8]) -> Result<()>
pub async fn write_all_bytes(&mut self, buffer: &[u8]) -> Result<()>
pub async fn send_reply<T: ReceiverHandler + Send>(
&mut self,
ctx: &mut ReceiverContext,
error_counter: &mut ErrorCounter,
handler: &mut T,
reply: Reply
) -> Result<()>
pub async fn send_reply<T: ReceiverHandler + Send>( &mut self, ctx: &mut ReceiverContext, error_counter: &mut ErrorCounter, handler: &mut T, reply: Reply ) -> Result<()>
Errors
std::io::Error
produced by the underlying writer