Skip to main content

Rfc5321Parser

Struct Rfc5321Parser 

Source
pub struct Rfc5321Parser<'x, 'y> {
    pub stop_char: u8,
    pub bytes_left: usize,
    /* private fields */
}

Fields§

§stop_char: u8§bytes_left: usize

Implementations§

Source§

impl<'x, 'y> Rfc5321Parser<'x, 'y>

Source

pub fn new(bytes: &'x mut Iter<'y, u8>) -> Self

Source

pub fn hashed_value(&mut self) -> Result<u64, Error>

Source

pub fn hashed_value_long(&mut self) -> Result<u128, Error>

Source

pub fn address(&mut self) -> Result<Option<Cow<'y, str>>, Error>

Source

pub fn string(&mut self) -> Result<Cow<'y, str>, Error>

Source

pub fn text(&mut self) -> Result<Cow<'y, str>, Error>

Source

pub fn xtext(&mut self) -> Result<Cow<'y, str>, Error>

Source

pub fn seek_char(&mut self, stop_char: u8) -> Result<Cow<'y, str>, Error>

Source

pub fn seek_lf(&mut self) -> Result<(), Error>

Source

pub fn next_char(&mut self) -> Result<u8, Error>

Source

pub fn read_char(&mut self) -> Result<u8, Error>

Source

pub fn size(&mut self) -> Result<usize, Error>

Source

pub fn integer(&mut self) -> Result<i64, Error>

Source

pub fn timestamp(&mut self) -> Result<i64, Error>

Source

pub fn mail_from_parameters( &mut self, address: Cow<'y, str>, ) -> Result<MailFrom<Cow<'y, str>>, Error>

Source

pub fn rcpt_to_parameters( &mut self, address: Cow<'y, str>, ) -> Result<RcptTo<Cow<'y, str>>, Error>

Source

pub fn mechanism(&mut self) -> Result<Option<u64>, Error>

Auto Trait Implementations§

§

impl<'x, 'y> !UnwindSafe for Rfc5321Parser<'x, 'y>

§

impl<'x, 'y> Freeze for Rfc5321Parser<'x, 'y>

§

impl<'x, 'y> RefUnwindSafe for Rfc5321Parser<'x, 'y>

§

impl<'x, 'y> Send for Rfc5321Parser<'x, 'y>

§

impl<'x, 'y> Sync for Rfc5321Parser<'x, 'y>

§

impl<'x, 'y> Unpin for Rfc5321Parser<'x, 'y>

§

impl<'x, 'y> UnsafeUnpin for Rfc5321Parser<'x, 'y>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.