#[non_exhaustive]pub struct EmailBodyValue {
pub value: String,
pub is_encoding_problem: bool,
pub is_truncated: bool,
}Expand description
The decoded text content of one body part (RFC 8621 §4.1.4).
Returned inside the bodyValues map of an Email object.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.value: StringThe decoded text content of the part.
is_encoding_problem: booltrue if charset decoding or content-transfer-encoding decoding
encountered errors (RFC 8621 §4.1.4).
Always present in serialized output (no skip_serializing_if); RFC 8621 §4.1.4
requires both flags in the bodyValues map. #[serde(default)] handles
deserialization when absent (treated as false).
is_truncated: booltrue if value was truncated due to a maxBodyValueBytes limit
(RFC 8621 §4.1.4).
Always present in serialized output; same rationale as is_encoding_problem.
Implementations§
Source§impl EmailBodyValue
impl EmailBodyValue
Sourcepub fn new(value: impl Into<String>) -> Self
pub fn new(value: impl Into<String>) -> Self
Construct an EmailBodyValue with the given text content.
is_encoding_problem and is_truncated default to false.
Trait Implementations§
Source§impl Clone for EmailBodyValue
impl Clone for EmailBodyValue
Source§fn clone(&self) -> EmailBodyValue
fn clone(&self) -> EmailBodyValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmailBodyValue
impl Debug for EmailBodyValue
Source§impl<'de> Deserialize<'de> for EmailBodyValue
impl<'de> Deserialize<'de> for EmailBodyValue
Source§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
Source§impl PartialEq for EmailBodyValue
impl PartialEq for EmailBodyValue
Source§impl Serialize for EmailBodyValue
impl Serialize for EmailBodyValue
impl Eq for EmailBodyValue
impl StructuralPartialEq for EmailBodyValue
Auto Trait Implementations§
impl Freeze for EmailBodyValue
impl RefUnwindSafe for EmailBodyValue
impl Send for EmailBodyValue
impl Sync for EmailBodyValue
impl Unpin for EmailBodyValue
impl UnsafeUnpin for EmailBodyValue
impl UnwindSafe for EmailBodyValue
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