Struct vsmtp_mail_parser::RawBody
pub struct RawBody { /* private fields */ }Expand description
Representation of a mail
Implementations§
§impl RawBody
impl RawBody
pub fn headers_lines(&self) -> impl Iterator<Item = &str>
pub fn headers_lines(&self) -> impl Iterator<Item = &str>
Return an iterator over the headers field
pub const fn raw_headers(&self) -> &Vec<String>
pub const fn raw_headers(&self) -> &Vec<String>
Get all headers without parsing.
pub fn get_header(&self, name: &str, with_key: bool) -> Option<String>
pub fn get_header(&self, name: &str, with_key: bool) -> Option<String>
Search for a header (using lowercase) and return its value.
pub fn count_header(&self, name: &str) -> usize
pub fn count_header(&self, name: &str) -> usize
Count the number of time a header is present. (using lowercase)
pub fn set_header(&mut self, name: &str, value: &str)
pub fn set_header(&mut self, name: &str, value: &str)
Set the value of a header or add it if it does not already exist.
pub fn rename_header(&mut self, old: &str, new: &str)
pub fn rename_header(&mut self, old: &str, new: &str)
Rename a header.
pub fn add_header(&mut self, name: &str, value: &str)
pub fn add_header(&mut self, name: &str, value: &str)
Append a header to the list.
pub fn prepend_header(&mut self, headers: impl IntoIterator<Item = String>)
pub fn prepend_header(&mut self, headers: impl IntoIterator<Item = String>)
Prepend a header to the list.
pub fn remove_header(&mut self, name: &str) -> bool
pub fn remove_header(&mut self, name: &str) -> bool
Remove a header from the list.
Trait Implementations§
§impl<'de> Deserialize<'de> for RawBody
impl<'de> Deserialize<'de> for RawBody
§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