Skip to main content

XmtpFfiEnrichedMessage

Struct XmtpFfiEnrichedMessage 

Source
#[repr(C)]
pub struct XmtpFfiEnrichedMessage {
Show 15 fields pub id: *mut c_char, pub group_id: *mut c_char, pub sender_inbox_id: *mut c_char, pub sender_installation_id: *mut c_char, pub sent_at_ns: i64, pub inserted_at_ns: i64, pub kind: XmtpFfiMessageKind, pub delivery_status: XmtpFfiDeliveryStatus, pub content_type: *mut c_char, pub fallback_text: *mut c_char, pub expires_at_ns: i64, pub num_reactions: i32, pub num_replies: i32, pub content_bytes: *mut u8, pub content_bytes_len: i32,
}
Expand description

An enriched (decoded) message exposed to C. Contains metadata + the original encoded content bytes for upper-layer decoding.

Fields§

§id: *mut c_char

Message ID (hex string, owned).

§group_id: *mut c_char

Group ID (hex string, owned).

§sender_inbox_id: *mut c_char

Sender inbox ID (owned string).

§sender_installation_id: *mut c_char

Sender installation ID (hex string, owned).

§sent_at_ns: i64

Sent timestamp in nanoseconds.

§inserted_at_ns: i64

Inserted-into-DB timestamp in nanoseconds.

§kind: XmtpFfiMessageKind§delivery_status: XmtpFfiDeliveryStatus§content_type: *mut c_char

Content type ID string (e.g. “xmtp.org/text:1.0”, owned).

§fallback_text: *mut c_char

Fallback text (nullable, owned).

§expires_at_ns: i64

Expiration timestamp in nanoseconds (0 = no expiration).

§num_reactions: i32

Number of reactions.

§num_replies: i32

Number of replies.

§content_bytes: *mut u8

Raw decrypted content bytes (protobuf-encoded EncodedContent, owned).

§content_bytes_len: i32

Length of content_bytes. 0 if unavailable.

Trait Implementations§

Source§

impl Clone for XmtpFfiEnrichedMessage

Source§

fn clone(&self) -> XmtpFfiEnrichedMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for XmtpFfiEnrichedMessage

Source§

impl Debug for XmtpFfiEnrichedMessage

Source§

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

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

impl Default for XmtpFfiEnrichedMessage

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for XmtpFfiEnrichedMessage

Source§

impl PartialEq for XmtpFfiEnrichedMessage

Source§

fn eq(&self, other: &XmtpFfiEnrichedMessage) -> 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 XmtpFfiEnrichedMessage

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.