Enum SendMessageType
#[repr(i32)]pub enum SendMessageType {
Unspecified = 0,
DoubleRatchet = 1,
PrekeyMessage = 2,
PlaintextContent = 3,
UnidentifiedSender = 4,
}Variants§
Unspecified = 0
DoubleRatchet = 1
A double-ratchet message represents a “normal,” “unsealed-sender” message encrypted using the Double Ratchet within an established Signal session.
PrekeyMessage = 2
A prekey message begins a new Signal session. The content of a prekey
message is a superset of a double-ratchet message’s content and
contains the sender’s identity public key and information identifying the
pre-keys used in the message’s ciphertext.
PlaintextContent = 3
A plaintext message is used solely to convey encryption error receipts and never contains encrypted message content. Encryption error receipts must be delivered in plaintext because encryption/decryption of a prior message failed and there is no reason to believe that encryption/decryption of subsequent messages with the same key material would succeed.
Critically, plaintext messages never have “real” message content generated by users. Plaintext messages include sender information.
UnidentifiedSender = 4
An unidentified sender message is an encrypted message. No other information about the type of the encrypted message is known to the server.
Unidenitfied sender messages require an unidentified access token or a group send endorsement token to prove the unidentified sender is authorized to send messages to the destination.
Implementations§
§impl SendMessageType
impl SendMessageType
§impl SendMessageType
impl SendMessageType
pub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn from_str_name(value: &str) -> Option<SendMessageType>
pub fn from_str_name(value: &str) -> Option<SendMessageType>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
§impl Clone for SendMessageType
impl Clone for SendMessageType
§fn clone(&self) -> SendMessageType
fn clone(&self) -> SendMessageType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SendMessageType
§impl Debug for SendMessageType
impl Debug for SendMessageType
§impl Default for SendMessageType
impl Default for SendMessageType
§fn default() -> SendMessageType
fn default() -> SendMessageType
impl Eq for SendMessageType
§impl Hash for SendMessageType
impl Hash for SendMessageType
§impl Ord for SendMessageType
impl Ord for SendMessageType
§fn cmp(&self, other: &SendMessageType) -> Ordering
fn cmp(&self, other: &SendMessageType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for SendMessageType
impl PartialEq for SendMessageType
§impl PartialOrd for SendMessageType
impl PartialOrd for SendMessageType
impl StructuralPartialEq for SendMessageType
§impl TryFrom<i32> for SendMessageType
impl TryFrom<i32> for SendMessageType
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
§fn try_from(value: i32) -> Result<SendMessageType, UnknownEnumValue>
fn try_from(value: i32) -> Result<SendMessageType, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for SendMessageType
impl RefUnwindSafe for SendMessageType
impl Send for SendMessageType
impl Sync for SendMessageType
impl Unpin for SendMessageType
impl UnsafeUnpin for SendMessageType
impl UnwindSafe for SendMessageType
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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].