#[non_exhaustive]pub struct EmailBodyValue {
pub value: String,
pub is_encoding_problem: bool,
pub is_truncated: bool,
pub extra: Map<String, Value>,
}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
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.
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
impl Eq for EmailBodyValue
Source§impl PartialEq for EmailBodyValue
impl PartialEq for EmailBodyValue
Source§fn eq(&self, other: &EmailBodyValue) -> bool
fn eq(&self, other: &EmailBodyValue) -> bool
self and other values to be equal, and is used by ==.