pub struct PqxdhInbox {
pub inbox_type: InboxType,
pub pqxdh_prekeys: PqxdhPrekeyBundle,
pub max_echo_size: Option<u32>,
pub expires_at: Option<u64>,
}Expand description
PQXDH inbox for connecting to a user
Fields§
§inbox_type: InboxTypeAccess control and responsiveness expectations
pqxdh_prekeys: PqxdhPrekeyBundlePQXDH prekeys for key agreement (always present)
max_echo_size: Option<u32>Maximum echo payload size in bytes (None = unlimited)
expires_at: Option<u64>When this inbox expires (Unix timestamp)
Implementations§
Source§impl PqxdhInbox
impl PqxdhInbox
Sourcepub fn new(
inbox_type: InboxType,
pqxdh_prekeys: PqxdhPrekeyBundle,
max_echo_size: Option<u32>,
expires_at: Option<u64>,
) -> Self
pub fn new( inbox_type: InboxType, pqxdh_prekeys: PqxdhPrekeyBundle, max_echo_size: Option<u32>, expires_at: Option<u64>, ) -> Self
Create a new echo service inbox
Sourcepub fn is_expired(&self, current_time: u64) -> bool
pub fn is_expired(&self, current_time: u64) -> bool
Check if this inbox has expired
Sourcepub fn accepts_payload_size(&self, size: u32) -> bool
pub fn accepts_payload_size(&self, size: u32) -> bool
Check if a payload size is acceptable for this echo service
Trait Implementations§
Source§impl Clone for PqxdhInbox
impl Clone for PqxdhInbox
Source§fn clone(&self) -> PqxdhInbox
fn clone(&self) -> PqxdhInbox
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PqxdhInbox
impl Debug for PqxdhInbox
Source§impl<'de> Deserialize<'de> for PqxdhInbox
impl<'de> Deserialize<'de> for PqxdhInbox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PqxdhInbox
impl PartialEq for PqxdhInbox
Source§impl Serialize for PqxdhInbox
impl Serialize for PqxdhInbox
impl StructuralPartialEq for PqxdhInbox
Auto Trait Implementations§
impl Freeze for PqxdhInbox
impl RefUnwindSafe for PqxdhInbox
impl Send for PqxdhInbox
impl Sync for PqxdhInbox
impl Unpin for PqxdhInbox
impl UnwindSafe for PqxdhInbox
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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