EditedMessage

Struct EditedMessage 

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

Main edited message container

§Background

iMessage permits editing sent messages up to five times within 15 minutes of sending the first message and unsending sent messages within 2 minutes.

§Internal Representation

Edited or unsent messages are stored with a NULL text field. Edited messages include message_summary_info that contains an array of typedstream data where each array item contains the edited message. The order in the array represents the order the messages were edited in, i.e. item 0 was the original and the last item is the current message.

§Message Body Parts

  • The otr key contains a dictionary of message body part indexes with some associated metadata.
  • The rp key contains a list of unsent message parts
  • The ec key contains a dictionary of edited message part indexes mapping to the history of edits
    • For each dictionary item in this array, The d key represents the time the message was edited and the t key represents the message’s attributedBody text in the typedstream format.

§Documentation

Apple describes editing and unsending messages here.

Fields§

§parts: Vec<EditedMessagePart>

Contains data representing each part of an edited message

Implementations§

Source§

impl EditedMessage

Source

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

Gets the edited message data for the given message part index

Source

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

Indicates if the given message part has been edited

Source

pub fn items(&self) -> usize

Gets the number of parts that may or may not have been edited or unsent

Trait Implementations§

Source§

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

Source§

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

Creates the object from a HashMap of item attributes
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 · 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.