#[non_exhaustive]pub struct SearchSnippet {
pub email_id: Id,
pub subject: Option<String>,
pub preview: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A search result snippet for one Email (RFC 8621 §5).
Returned by SearchSnippet/get. Note that SearchSnippet has no id
field — it is identified by email_id instead.
The subject and preview fields are None when the server could not
determine a snippet for that Email. Per RFC 8620 §5.1, absent and null
are semantically equivalent for |null properties, so these fields are
omitted from serialized JSON (rather than emitted as null) when None.
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.email_id: IdThe Email id the snippet applies to.
subject: Option<String>Subject of the Email with matching words wrapped in <mark> tags, or
null if the subject did not match the filter.
preview: Option<String>Relevant section of the body with matching words wrapped in <mark>
tags (max 255 octets), or null if the body did not match the filter.
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 SearchSnippet
impl SearchSnippet
Sourcepub fn new(email_id: Id) -> Self
pub fn new(email_id: Id) -> Self
Construct a SearchSnippet with no subject or preview match.