Struct veilid_core::Envelope
source · pub struct Envelope { /* private fields */ }
Implementations§
source§impl Envelope
impl Envelope
pub fn new( version: EnvelopeVersion, crypto_kind: CryptoKind, timestamp: Timestamp, nonce: Nonce, sender_id: PublicKey, recipient_id: PublicKey ) -> Self
pub fn from_signed_data( crypto: Crypto, data: &[u8], network_key: &Option<SharedSecret> ) -> VeilidAPIResult<Envelope>
pub fn decrypt_body( &self, crypto: Crypto, data: &[u8], node_id_secret: &SecretKey, network_key: &Option<SharedSecret> ) -> VeilidAPIResult<Vec<u8>>
pub fn to_encrypted_data( &self, crypto: Crypto, body: &[u8], node_id_secret: &SecretKey, network_key: &Option<SharedSecret> ) -> VeilidAPIResult<Vec<u8>>
pub fn get_version(&self) -> u8
pub fn get_crypto_kind(&self) -> CryptoKind
pub fn get_timestamp(&self) -> Timestamp
pub fn get_nonce(&self) -> Nonce
pub fn get_sender_id(&self) -> PublicKey
pub fn get_sender_typed_id(&self) -> TypedKey
pub fn get_recipient_id(&self) -> PublicKey
pub fn get_recipient_typed_id(&self) -> TypedKey
Trait Implementations§
source§impl PartialEq for Envelope
impl PartialEq for Envelope
impl Eq for Envelope
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 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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.