pub struct EditedMessage<'a> {
    pub dates: Vec<i64>,
    pub texts: Vec<String>,
    pub guids: Vec<Option<&'a str>>,
}
Expand description

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

Edited or unsent messages are stored with a NULL text field. Edited messages include message_summary_info that contains an array of streamtyped 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.

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 streamtyped format.

There is no data in the array if the message was unsent.

Apple describes editing and unsending messages here.

Fields§

§dates: Vec<i64>

The dates the messages were edited

§texts: Vec<String>

The content of the edited messages in streamtyped format

§guids: Vec<Option<&'a str>>

A GUID reference to another message

Implementations§

source§

impl<'a> EditedMessage<'a>

source

pub fn is_deleted(&self) -> bool

true if the message was deleted, false if it was edited

source

pub fn item_at(&self, position: usize) -> Option<(&i64, &str, &Option<&str>)>

Gets a tuple for the message at the provided position

source

pub fn items(&self) -> usize

Gets the number of items in the edit history

Trait Implementations§

source§

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

source§

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

Creates the object from a HashMap of item attributes
source§

impl<'a> Debug for EditedMessage<'a>

source§

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

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

impl<'a> PartialEq<EditedMessage<'a>> for EditedMessage<'a>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Eq for EditedMessage<'a>

source§

impl<'a> StructuralEq for EditedMessage<'a>

source§

impl<'a> StructuralPartialEq for EditedMessage<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for EditedMessage<'a>

§

impl<'a> Send for EditedMessage<'a>

§

impl<'a> Sync for EditedMessage<'a>

§

impl<'a> Unpin for EditedMessage<'a>

§

impl<'a> UnwindSafe for EditedMessage<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.