pub struct KeyReference {
pub public_key: String,
pub source: KeySource,
}Expand description
One keys: entry of the CLI config: reference metadata, never a seed.
Fields§
§public_key: String§source: KeySourceImplementations§
Source§impl KeyReference
impl KeyReference
Sourcepub fn expected_public_key(&self) -> Result<[u8; 32]>
pub fn expected_public_key(&self) -> Result<[u8; 32]>
Canonical 32-byte public key; rejects anything but a canonical ta address.
Sourcepub fn load_file_seed(
&self,
base_dir: &Path,
) -> Result<(Zeroizing<[u8; 32]>, [u8; 32])>
pub fn load_file_seed( &self, base_dir: &Path, ) -> Result<(Zeroizing<[u8; 32]>, [u8; 32])>
Open the file source (relative paths resolve against base_dir) under the
key_file policy, read the seed and check it derives public_key.
Returns the seed and its public key. Keychain sources are refused.
Trait Implementations§
Source§impl Clone for KeyReference
impl Clone for KeyReference
Source§impl Debug for KeyReference
impl Debug for KeyReference
Source§impl<'de> Deserialize<'de> for KeyReference
impl<'de> Deserialize<'de> for KeyReference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for KeyReference
impl Freeze for KeyReference
impl Move for KeyReference
impl RefUnwindSafe for KeyReference
impl Send for KeyReference
impl Sync for KeyReference
impl Unpin for KeyReference
impl UnsafeUnpin for KeyReference
impl UnwindSafe for KeyReference
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