Skip to main content

EditedMessage

Struct EditedMessage 

Source
pub struct EditedMessage {
    pub parts: Vec<EditedMessagePart>,
}
Expand description

Parsed edit metadata for every body part in a message.

§Internal Representation

Edited or unsent messages are stored with a NULL text field. Edited messages include message_summary_info that contains a dictionary with message body part data, including typedstream-encoded edit history. The order of entries in the edit history represents the order the part changed: item 0 is the original text and the last item is the current text.

§Message Body Parts

  • otr: dictionary of message part indexes.
  • rp: list of unsent message part indexes.
  • ec: dictionary of edited message part indexes to edit history arrays.
  • Each ec item stores d (edit timestamp) and t (edited attributedBody typedstream).

§Documentation

Apple describes editing and unsending messages here.

Fields§

§parts: Vec<EditedMessagePart>

One entry per message body part.

Implementations§

Source§

impl EditedMessage

Source

pub fn part(&self, index: usize) -> Option<&EditedMessagePart>

Return edit metadata for the given body part index.

Source

pub fn is_unedited_at(&self, index: usize) -> bool

true when the given body part exists and has not been edited or unsent.

Source

pub fn items(&self) -> usize

Number of body parts tracked by this edit payload.

Trait Implementations§

Source§

impl<'a> BalloonProvider<'a> for EditedMessage

Source§

fn from_map(payload: &'a Value) -> Result<Self, PlistParseError>

Parse the type from a plist payload.
Source§

impl Debug for EditedMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for EditedMessage

Source§

fn eq(&self, other: &EditedMessage) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EditedMessage

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.