Struct minisign::PublicKeyBox
source · pub struct PublicKeyBox(/* private fields */);
Expand description
A public key and its metadata.
A PublicKeyBox
represents a raw public key, along with a key
identifier and an untrusted description.
This is what usually gets exported to disk.
A PublicKeyBox
can be directly converted to/from a single-line string.
Implementations§
source§impl PublicKeyBox
impl PublicKeyBox
sourcepub fn from_string(s: &str) -> Result<PublicKeyBox>
pub fn from_string(s: &str) -> Result<PublicKeyBox>
Create a new PublicKeyBox
from a string.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Return a PublicKeyBox
for a string, for storage.
sourcepub fn into_public_key(self) -> Result<PublicKey>
pub fn into_public_key(self) -> Result<PublicKey>
Convert a PublicKeyBox
to a string, for storage.
Trait Implementations§
source§impl Clone for PublicKeyBox
impl Clone for PublicKeyBox
source§fn clone(&self) -> PublicKeyBox
fn clone(&self) -> PublicKeyBox
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 PublicKeyBox
impl Debug for PublicKeyBox
source§impl From<PublicKeyBox> for PublicKey
impl From<PublicKeyBox> for PublicKey
source§fn from(pkb: PublicKeyBox) -> PublicKey
fn from(pkb: PublicKeyBox) -> PublicKey
Converts to this type from the input type.
source§impl From<PublicKeyBox> for String
impl From<PublicKeyBox> for String
source§fn from(pkb: PublicKeyBox) -> String
fn from(pkb: PublicKeyBox) -> String
Converts to this type from the input type.
source§impl From<String> for PublicKeyBox
impl From<String> for PublicKeyBox
source§fn from(s: String) -> PublicKeyBox
fn from(s: String) -> PublicKeyBox
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for PublicKeyBox
impl Send for PublicKeyBox
impl Sync for PublicKeyBox
impl Unpin for PublicKeyBox
impl UnwindSafe for PublicKeyBox
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