Struct bc_components::AgreementPublicKey
source · pub struct AgreementPublicKey(_);Expand description
A Curve25519 public key used for X25519 key agreement.
Implementations§
source§impl AgreementPublicKey
impl AgreementPublicKey
pub const KEY_SIZE: usize = 32usize
sourcepub const fn from_data(data: [u8; 32]) -> Self
pub const fn from_data(data: [u8; 32]) -> Self
Restore an AgreementPublicKey from a fixed-size array of bytes.
sourcepub fn from_data_ref<T>(data: &T) -> Option<Self>where
T: AsRef<[u8]>,
pub fn from_data_ref<T>(data: &T) -> Option<Self>where T: AsRef<[u8]>,
Restore an AgreementPublicKey from a reference to an array of bytes.
Trait Implementations§
source§impl CBORDecodable for AgreementPublicKey
impl CBORDecodable for AgreementPublicKey
source§impl CBOREncodable for AgreementPublicKey
impl CBOREncodable for AgreementPublicKey
source§impl CBORTagged for AgreementPublicKey
impl CBORTagged for AgreementPublicKey
source§impl CBORTaggedDecodable for AgreementPublicKey
impl CBORTaggedDecodable for AgreementPublicKey
source§fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self, Error>
fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self, Error>
Creates an instance of this type by decoding it from untagged CBOR.
source§fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
source§impl CBORTaggedEncodable for AgreementPublicKey
impl CBORTaggedEncodable for AgreementPublicKey
source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
source§impl Clone for AgreementPublicKey
impl Clone for AgreementPublicKey
source§fn clone(&self) -> AgreementPublicKey
fn clone(&self) -> AgreementPublicKey
Returns a copy 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 AgreementPublicKey
impl Debug for AgreementPublicKey
source§impl<'a> From<&'a AgreementPublicKey> for &'a [u8; 32]
impl<'a> From<&'a AgreementPublicKey> for &'a [u8; 32]
source§fn from(value: &'a AgreementPublicKey) -> Self
fn from(value: &'a AgreementPublicKey) -> Self
Converts to this type from the input type.
source§impl From<&AgreementPublicKey> for AgreementPublicKey
impl From<&AgreementPublicKey> for AgreementPublicKey
source§fn from(key: &AgreementPublicKey) -> Self
fn from(key: &AgreementPublicKey) -> Self
Converts to this type from the input type.
source§impl From<&AgreementPublicKey> for Vec<u8>
impl From<&AgreementPublicKey> for Vec<u8>
source§fn from(key: &AgreementPublicKey) -> Self
fn from(key: &AgreementPublicKey) -> Self
Converts to this type from the input type.
source§impl From<AgreementPublicKey> for Vec<u8>
impl From<AgreementPublicKey> for Vec<u8>
source§fn from(key: AgreementPublicKey) -> Self
fn from(key: AgreementPublicKey) -> Self
Converts to this type from the input type.
source§impl From<Rc<AgreementPublicKey, Global>> for AgreementPublicKey
impl From<Rc<AgreementPublicKey, Global>> for AgreementPublicKey
source§fn from(value: Rc<AgreementPublicKey>) -> Self
fn from(value: Rc<AgreementPublicKey>) -> Self
Converts to this type from the input type.
source§impl Hash for AgreementPublicKey
impl Hash for AgreementPublicKey
source§impl PartialEq<AgreementPublicKey> for AgreementPublicKey
impl PartialEq<AgreementPublicKey> for AgreementPublicKey
source§fn eq(&self, other: &AgreementPublicKey) -> bool
fn eq(&self, other: &AgreementPublicKey) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl URDecodable for AgreementPublicKey
impl URDecodable for AgreementPublicKey
source§impl UREncodable for AgreementPublicKey
impl UREncodable for AgreementPublicKey
impl Eq for AgreementPublicKey
impl StructuralEq for AgreementPublicKey
impl StructuralPartialEq for AgreementPublicKey
impl URCodable for AgreementPublicKey
Auto Trait Implementations§
impl RefUnwindSafe for AgreementPublicKey
impl Send for AgreementPublicKey
impl Sync for AgreementPublicKey
impl Unpin for AgreementPublicKey
impl UnwindSafe for AgreementPublicKey
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