Struct threema_gateway::RecipientKey
source · pub struct RecipientKey(pub PublicKey);
Expand description
The public key of a recipient.
Tuple Fields
0: PublicKey
Implementations
sourceimpl RecipientKey
impl RecipientKey
sourcepub fn from_bytes(val: &[u8]) -> Result<Self, CryptoError>
pub fn from_bytes(val: &[u8]) -> Result<Self, CryptoError>
Create a RecipientKey
from a byte slice. It must contain 32 bytes.
sourcepub fn from_str(val: &str) -> Result<Self, CryptoError>
pub fn from_str(val: &str) -> Result<Self, CryptoError>
Create a RecipientKey
from a hex encoded string slice.
Trait Implementations
sourceimpl From<[u8; 32]> for RecipientKey
impl From<[u8; 32]> for RecipientKey
sourceimpl From<PublicKey> for RecipientKey
impl From<PublicKey> for RecipientKey
Auto Trait Implementations
impl RefUnwindSafe for RecipientKey
impl Send for RecipientKey
impl Sync for RecipientKey
impl Unpin for RecipientKey
impl UnwindSafe for RecipientKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more