Struct Envelope
pub struct Envelope {Show 14 fields
pub type: Option<i32>,
pub source_device: Option<u32>,
pub client_timestamp: Option<u64>,
pub content: Option<Vec<u8>>,
pub server_timestamp: Option<u64>,
pub ephemeral: Option<bool>,
pub urgent: Option<bool>,
pub story: Option<bool>,
pub report_spam_token: Option<Vec<u8>>,
pub shared_mrm_key: Option<Vec<u8>>,
pub source_service_id: Option<Vec<u8>>,
pub destination_service_id: Option<Vec<u8>>,
pub server_guid: Option<Vec<u8>>,
pub updated_pni: Option<Vec<u8>>,
}Fields§
§type: Option<i32>§source_device: Option<u32>§client_timestamp: Option<u64>§content: Option<Vec<u8>>Contains an encrypted Content
server_timestamp: Option<u64>§ephemeral: Option<bool>indicates that the message should not be persisted if the recipient is offline
urgent: Option<bool>§story: Option<bool>indicates that the content is a story.
report_spam_token: Option<Vec<u8>>token sent when reporting spam
indicates content should be fetched from multi-recipient message datastore
source_service_id: Option<Vec<u8>>service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
destination_service_id: Option<Vec<u8>>service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI)
server_guid: Option<Vec<u8>>16-byte UUID
updated_pni: Option<Vec<u8>>16-byte UUID
Implementations§
§impl Envelope
impl Envelope
pub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type, or the default if the field is unset or set to an invalid enum value.
pub fn client_timestamp(&self) -> u64
pub fn client_timestamp(&self) -> u64
Returns the value of client_timestamp, or the default value if client_timestamp is unset.
pub fn source_device(&self) -> u32
pub fn source_device(&self) -> u32
Returns the value of source_device, or the default value if source_device is unset.
pub fn content(&self) -> &[u8] ⓘ
pub fn content(&self) -> &[u8] ⓘ
Returns the value of content, or the default value if content is unset.
pub fn server_timestamp(&self) -> u64
pub fn server_timestamp(&self) -> u64
Returns the value of server_timestamp, or the default value if server_timestamp is unset.
pub fn ephemeral(&self) -> bool
pub fn ephemeral(&self) -> bool
Returns the value of ephemeral, or the default value if ephemeral is unset.
pub fn report_spam_token(&self) -> &[u8] ⓘ
pub fn report_spam_token(&self) -> &[u8] ⓘ
Returns the value of report_spam_token, or the default value if report_spam_token is unset.
Returns the value of shared_mrm_key, or the default value if shared_mrm_key is unset.
pub fn source_service_id(&self) -> &[u8] ⓘ
pub fn source_service_id(&self) -> &[u8] ⓘ
Returns the value of source_service_id, or the default value if source_service_id is unset.
pub fn destination_service_id(&self) -> &[u8] ⓘ
pub fn destination_service_id(&self) -> &[u8] ⓘ
Returns the value of destination_service_id, or the default value if destination_service_id is unset.
pub fn server_guid(&self) -> &[u8] ⓘ
pub fn server_guid(&self) -> &[u8] ⓘ
Returns the value of server_guid, or the default value if server_guid is unset.
pub fn updated_pni(&self) -> &[u8] ⓘ
pub fn updated_pni(&self) -> &[u8] ⓘ
Returns the value of updated_pni, or the default value if updated_pni is unset.
Trait Implementations§
impl Eq for Envelope
§impl Message for Envelope
impl Message for Envelope
§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].