pub struct Draft {
pub headers: HeaderMap,
pub body: String,
pub wrap_header_preamble: Option<(String, String)>,
pub attachments: Vec<AttachmentBuilder>,
}
Fields§
§headers: HeaderMap
§body: String
§wrap_header_preamble: Option<(String, String)>
§attachments: Vec<AttachmentBuilder>
Implementations§
source§impl Draft
impl Draft
pub fn edit(envelope: &Envelope, bytes: &[u8]) -> Result<Self>
pub fn set_header(&mut self, header: HeaderName, value: String) -> &mut Self
pub fn try_set_header( &mut self, header: &str, value: String ) -> Result<&mut Self, InvalidHeaderName>
pub fn set_wrap_header_preamble( &mut self, value: Option<(String, String)> ) -> &mut Self
pub fn update(&mut self, value: &str) -> Result<bool>
pub fn new_reply(envelope: &Envelope, bytes: &[u8], reply_to_all: bool) -> Self
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers(&self) -> &HeaderMap
pub fn attachments(&self) -> &Vec<AttachmentBuilder>
pub fn attachments_mut(&mut self) -> &mut Vec<AttachmentBuilder>
pub fn body(&self) -> &str
pub fn set_body(&mut self, s: String) -> &mut Self
pub fn to_edit_string(&self) -> String
pub fn finalise(self) -> Result<String>
Trait Implementations§
source§impl PartialEq for Draft
impl PartialEq for Draft
impl Eq for Draft
impl StructuralPartialEq for Draft
Auto Trait Implementations§
impl Freeze for Draft
impl RefUnwindSafe for Draft
impl Send for Draft
impl Sync for Draft
impl Unpin for Draft
impl UnwindSafe for Draft
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.