#[repr(i32)]pub enum Type {
Unknown = 0,
DoubleRatchet = 1,
PrekeyMessage = 3,
ServerDeliveryReceipt = 5,
UnidentifiedSender = 6,
PlaintextContent = 8,
}Variants§
Unknown = 0
DoubleRatchet = 1
A double-ratchet message represents a “normal,” “unsealed-sender” message
encrypted using the Double Ratchet within an established Signal session.
Double-ratchet messages include sender information in the plaintext
portion of the Envelope.
content => (version byte | SignalMessage{Content})
PrekeyMessage = 3
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. Like double-ratchet messages,
prekey messages contain sender information in the plaintext portion of
the Envelope.
content => (version byte | PreKeySignalMessage{Content})
ServerDeliveryReceipt = 5
Server delivery receipts are generated by the server when
“unsealed-sender” messages are delivered to and acknowledged by the
destination device. Server delivery receipts identify the sender in the
plaintext portion of the Envelope and have no content. Note that
receipts for sealed-sender messages are generated by clients as
UNIDENTIFIED_SENDER messages.
Note that, with server delivery receipts, the “client timestamp” on the envelope refers to the timestamp of the original message (i.e. the message the server just delivered) and not to the time of delivery. The “server timestamp” refers to the time of delivery.
content => []
UnidentifiedSender = 6
An unidentified sender message represents a message with no sender
information in the plaintext portion of the Envelope. Unidentified
sender messages always contain an additional subtype in their
content. They may or may not be part of an existing Signal session
(i.e. an unidentified sender message may have a “prekey message”
subtype or may indicate an encryption error).
content => ((version byte | UnidentifiedSenderMessage) OR (version byte | Multi-Recipient Sealed Sender Format))
PlaintextContent = 8
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.
content => (marker byte | Content)
Implementations§
Source§impl Type
impl Type
Sourcepub 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.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for Type
impl Ord for Type
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl Copy for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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].