pub struct VoicePublicKey { /* private fields */ }Expand description
An X-Wing encapsulation key (ML-KEM-768 ‖ X25519, 1 216 bytes), validated on parse.
Implementations§
Source§impl VoicePublicKey
impl VoicePublicKey
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, VoiceError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, VoiceError>
Parses and validates the encoding (the ML-KEM-768 part must be canonical).
§Errors
VoiceError::PublicKey for an invalid key, VoiceError::Length for a wrong length.
Trait Implementations§
Source§impl Clone for VoicePublicKey
impl Clone for VoicePublicKey
Source§fn clone(&self) -> VoicePublicKey
fn clone(&self) -> VoicePublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VoicePublicKey
impl Debug for VoicePublicKey
impl Eq for VoicePublicKey
Source§impl PartialEq for VoicePublicKey
impl PartialEq for VoicePublicKey
impl StructuralPartialEq for VoicePublicKey
Auto Trait Implementations§
impl Freeze for VoicePublicKey
impl RefUnwindSafe for VoicePublicKey
impl Send for VoicePublicKey
impl Sync for VoicePublicKey
impl Unpin for VoicePublicKey
impl UnsafeUnpin for VoicePublicKey
impl UnwindSafe for VoicePublicKey
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