pub enum OpaqueMessage {
ServerMessage(SealedEnvelope),
PeerMessage {
public_key: Vec<u8>,
session_id: Option<Uuid>,
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§fn decode<'life0, 'life1, 'async_trait, R>(
&'life0 mut self,
reader: &'life1 mut BinaryReader<R>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
R: 'async_trait + AsyncRead + AsyncSeek + Unpin + Send,
OpaqueMessage: 'async_trait,
fn decode<'life0, 'life1, 'async_trait, R>(
&'life0 mut self,
reader: &'life1 mut BinaryReader<R>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
R: 'async_trait + AsyncRead + AsyncSeek + Unpin + Send,
OpaqueMessage: 'async_trait,
Decode from the binary reader into self.
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<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
OpaqueMessage: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
OpaqueMessage: 'async_trait,
Encode self into the binary writer.
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