Struct tor_keymgr::ArtiNativeKeystore
source · pub struct ArtiNativeKeystore { /* private fields */ }Available on crate feature
keymgr only.Expand description
The Arti key store.
Implementations§
source§impl ArtiNativeKeystore
impl ArtiNativeKeystore
sourcepub fn from_path_and_mistrust(
keystore_dir: impl AsRef<Path>,
mistrust: &Mistrust
) -> Result<Self>
pub fn from_path_and_mistrust( keystore_dir: impl AsRef<Path>, mistrust: &Mistrust ) -> Result<Self>
Create a new ArtiNativeKeystore rooted at the specified keystore_dir directory.
The keystore_dir directory is created if it doesn’t exist.
This function returns an error if keystore_dir is not a directory, if it does not conform
to the requirements of the specified Mistrust, or if there was a problem creating the
directory.
Trait Implementations§
source§impl Debug for ArtiNativeKeystore
impl Debug for ArtiNativeKeystore
source§impl Keystore for ArtiNativeKeystore
impl Keystore for ArtiNativeKeystore
source§fn id(&self) -> &KeystoreId
fn id(&self) -> &KeystoreId
An identifier for this key store instance. Read more
source§fn contains(
&self,
key_spec: &dyn KeySpecifier,
key_type: &KeyType
) -> Result<bool>
fn contains( &self, key_spec: &dyn KeySpecifier, key_type: &KeyType ) -> Result<bool>
Check if the the key identified by
key_spec exists in this key store.source§fn get(
&self,
key_spec: &dyn KeySpecifier,
key_type: &KeyType
) -> Result<Option<ErasedKey>>
fn get( &self, key_spec: &dyn KeySpecifier, key_type: &KeyType ) -> Result<Option<ErasedKey>>
Retrieve the key identified by
key_spec. Read moresource§fn insert(
&self,
key: &dyn EncodableKey,
key_spec: &dyn KeySpecifier,
key_type: &KeyType
) -> Result<()>
fn insert( &self, key: &dyn EncodableKey, key_spec: &dyn KeySpecifier, key_type: &KeyType ) -> Result<()>
Write
key to the key store.Auto Trait Implementations§
impl RefUnwindSafe for ArtiNativeKeystore
impl Send for ArtiNativeKeystore
impl Sync for ArtiNativeKeystore
impl Unpin for ArtiNativeKeystore
impl UnwindSafe for ArtiNativeKeystore
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.