pub struct BareKey { /* private fields */ }Implementations§
Source§impl BareKey
impl BareKey
pub fn key_type(&self) -> KeyType
Sourcepub fn from_pem(pem: &str) -> Result<Self, KeyError>
pub fn from_pem(pem: &str) -> Result<Self, KeyError>
Load a key from a PEM-encoded string. Supported formats are PKCS1, PKCS8,
SEC1, and JWT OCTAL KEY.
pub fn from_pem_multiple( pem: &str, ) -> Result<Vec<Result<Self, KeyError>>, KeyError>
pub fn try_to_public(&self) -> Result<BarePublicKey, KeyError>
pub fn try_to_private(&self) -> Result<BarePrivateKey, KeyError>
pub fn try_into_public(self) -> Result<BarePublicKey, KeyError>
pub fn try_into_private(self) -> Result<BarePrivateKey, KeyError>
pub fn to_pem(&self) -> String
pub fn clone_key(&self) -> Self
Trait Implementations§
impl Eq for BareKey
impl StructuralPartialEq for BareKey
Auto Trait Implementations§
impl Freeze for BareKey
impl RefUnwindSafe for BareKey
impl Send for BareKey
impl Sync for BareKey
impl Unpin for BareKey
impl UnwindSafe for BareKey
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