#[non_exhaustive]pub struct MlKem768Ciphertext(/* private fields */);Expand description
ML-KEM-768 ciphertext. 1088 bytes.
Implementations§
Source§impl MlKem768Ciphertext
impl MlKem768Ciphertext
Sourcepub fn from_bytes(bytes: [u8; 1088]) -> Self
pub fn from_bytes(bytes: [u8; 1088]) -> Self
Construct from raw bytes — typically the receiving side of a wire-format decode.
Sourcepub fn try_from_slice(bytes: &[u8]) -> Result<Self, KyberLibError>
pub fn try_from_slice(bytes: &[u8]) -> Result<Self, KyberLibError>
Construct from a borrowed slice, validating the length.
§Errors
Returns KyberLibError::InvalidLength if bytes.len() != KYBER_CIPHERTEXT_BYTES.
Trait Implementations§
Source§impl Clone for MlKem768Ciphertext
impl Clone for MlKem768Ciphertext
Source§fn clone(&self) -> MlKem768Ciphertext
fn clone(&self) -> MlKem768Ciphertext
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 moreimpl Copy for MlKem768Ciphertext
Source§impl Debug for MlKem768Ciphertext
impl Debug for MlKem768Ciphertext
impl Eq for MlKem768Ciphertext
Source§impl PartialEq for MlKem768Ciphertext
impl PartialEq for MlKem768Ciphertext
impl StructuralPartialEq for MlKem768Ciphertext
Auto Trait Implementations§
impl Freeze for MlKem768Ciphertext
impl RefUnwindSafe for MlKem768Ciphertext
impl Send for MlKem768Ciphertext
impl Sync for MlKem768Ciphertext
impl Unpin for MlKem768Ciphertext
impl UnsafeUnpin for MlKem768Ciphertext
impl UnwindSafe for MlKem768Ciphertext
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