pub enum OpaqueMessage {
ServerMessage(SealedEnvelope),
PeerMessage {
public_key: Vec<u8>,
session_id: Option<SessionId>,
envelope: SealedEnvelope,
},
// some variants omitted
}
Expand description
Opaque messaages are encrypted.
Variants§
ServerMessage(SealedEnvelope)
Encrypted message sent between the server and a client.
After decrypting it can be decoded to a server message.
PeerMessage
Relay an encrypted message to a peer.
Trait Implementations§
Source§impl Debug for OpaqueMessage
impl Debug for OpaqueMessage
Source§impl Decodable for OpaqueMessage
impl Decodable for OpaqueMessage
Source§impl Default for OpaqueMessage
impl Default for OpaqueMessage
Source§fn default() -> OpaqueMessage
fn default() -> OpaqueMessage
Returns the “default value” for a type. Read more
Source§impl Encodable for OpaqueMessage
impl Encodable for OpaqueMessage
Source§fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Encode self into the binary writer.
Source§impl From<&OpaqueMessage> for u8
impl From<&OpaqueMessage> for u8
Source§fn from(value: &OpaqueMessage) -> Self
fn from(value: &OpaqueMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpaqueMessage
impl RefUnwindSafe for OpaqueMessage
impl Send for OpaqueMessage
impl Sync for OpaqueMessage
impl Unpin for OpaqueMessage
impl UnwindSafe for OpaqueMessage
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
Mutably borrows from an owned value. Read more