pub struct StoredKey {
pub secret_hex: Option<String>,
pub pubkey_hex: String,
pub petname: Option<String>,
}Expand description
A stored key with optional petname
Fields§
§secret_hex: Option<String>Secret key in hex format, when this identity can sign
pubkey_hex: StringPublic key in hex format
petname: Option<String>Optional petname (e.g., “default”, “work”)
Implementations§
Source§impl StoredKey
impl StoredKey
Sourcepub fn from_secret_hex(
secret_hex: &str,
petname: Option<String>,
) -> Result<Self>
pub fn from_secret_hex( secret_hex: &str, petname: Option<String>, ) -> Result<Self>
Create from secret key hex, deriving pubkey
Sourcepub fn from_nsec(nsec: &str, petname: Option<String>) -> Result<Self>
pub fn from_nsec(nsec: &str, petname: Option<String>) -> Result<Self>
Create from nsec bech32 format
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StoredKey
impl RefUnwindSafe for StoredKey
impl Send for StoredKey
impl Sync for StoredKey
impl Unpin for StoredKey
impl UnsafeUnpin for StoredKey
impl UnwindSafe for StoredKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more