Struct vsmtp_protocol::Reader
pub struct Reader<R: AsyncRead + Unpin + Send> { /* private fields */ }Expand description
Stream for reading commands from the client.
Implementations§
§impl<R: AsyncRead + Unpin + Send> Reader<R>
impl<R: AsyncRead + Unpin + Send> Reader<R>
pub const fn new(tcp_stream: R) -> Self
pub const fn new(tcp_stream: R) -> Self
Create a new stream.
pub fn into_inner(self) -> R
pub fn into_inner(self) -> R
Consume the instance and return the underlying reader.
pub fn as_line_stream(&mut self) -> impl Stream<Item = Result<Vec<u8>>> + '_
pub fn as_line_stream(&mut self) -> impl Stream<Item = Result<Vec<u8>>> + '_
Produce a stream of “\r\n” terminated lines.
pub fn as_message_stream(
&mut self,
size_limit: usize
) -> impl Stream<Item = Result<Vec<u8>, Error>> + '_
pub fn as_message_stream( &mut self, size_limit: usize ) -> impl Stream<Item = Result<Vec<u8>, Error>> + '_
Produce a stream of lines to generate IMF compliant messages.
pub fn as_command_stream(
&mut self
) -> impl Stream<Item = Result<(Verb, UnparsedArgs), Error>> + '_
pub fn as_command_stream( &mut self ) -> impl Stream<Item = Result<(Verb, UnparsedArgs), Error>> + '_
Produce a stream of ESMTP commands.
pub fn as_reply_stream(
&mut self
) -> impl Stream<Item = Result<Reply, Error>> + '_
pub fn as_reply_stream( &mut self ) -> impl Stream<Item = Result<Reply, Error>> + '_
Produce a stream of SMTP replies.