Struct ockam_api::cli_state::credentials::CredentialsState
source · pub struct CredentialsState { /* private fields */ }Trait Implementations§
source§impl Clone for CredentialsState
impl Clone for CredentialsState
source§fn clone(&self) -> CredentialsState
fn clone(&self) -> CredentialsState
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 CredentialsState
impl Debug for CredentialsState
source§impl PartialEq for CredentialsState
impl PartialEq for CredentialsState
source§fn eq(&self, other: &CredentialsState) -> bool
fn eq(&self, other: &CredentialsState) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl StateDirTrait for CredentialsState
impl StateDirTrait for CredentialsState
type Item = CredentialState
const DEFAULT_FILENAME: &'static str = "credential"
const DIR_NAME: &'static str = "credentials"
const HAS_DATA_DIR: bool = false
fn new(root_path: &Path) -> Self
fn dir(&self) -> &PathBuf
fn default_filename() -> &'static str
fn build_dir(root_path: &Path) -> PathBuf
fn has_data_dir() -> bool
source§fn init<'life0, 'async_trait>(
root_path: &'life0 Path
) -> Pin<Box<dyn Future<Output = Result<Self, CliStateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>( root_path: &'life0 Path ) -> Pin<Box<dyn Future<Output = Result<Self, CliStateError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Load the root configuration
and migrate each entry if necessary
source§fn migrate<'life0, 'life1, 'async_trait>(
&'life0 self,
_path: &'life1 Path
) -> Pin<Box<dyn Future<Output = Result<(), CliStateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn migrate<'life0, 'life1, 'async_trait>( &'life0 self, _path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<(), CliStateError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Do not run any migration by default
fn load(root_path: &Path) -> Result<Self, CliStateError>
source§fn reset(&self, root_path: &Path) -> Result<PathBuf, CliStateError>
fn reset(&self, root_path: &Path) -> Result<PathBuf, CliStateError>
Recreate all the state directories
source§fn create_dirs(root_path: &Path) -> Result<PathBuf, CliStateError>
fn create_dirs(root_path: &Path) -> Result<PathBuf, CliStateError>
Create all the state directories
fn dir_as_string(&self) -> String
fn path(&self, name: impl AsRef<str>) -> PathBuf
fn overwrite( &self, name: impl AsRef<str>, config: <<Self as StateDirTrait>::Item as StateItemTrait>::Config ) -> Result<Self::Item, CliStateError>
fn create( &self, name: impl AsRef<str>, config: <<Self as StateDirTrait>::Item as StateItemTrait>::Config ) -> Result<Self::Item, CliStateError>
fn get(&self, name: impl AsRef<str>) -> Result<Self::Item, CliStateError>
fn list(&self) -> Result<Vec<Self::Item>, CliStateError>
fn list_items_names(&self) -> Result<Vec<String>, CliStateError>
fn is_item_path(&self, path: &PathBuf) -> Result<bool, CliStateError>
fn list_items_paths(&self) -> Result<Vec<PathBuf>, CliStateError>
fn delete(&self, name: impl AsRef<str>) -> Result<(), CliStateError>
fn default_path(&self) -> Result<PathBuf, CliStateError>
fn default(&self) -> Result<Self::Item, CliStateError>
fn set_default(&self, name: impl AsRef<str>) -> Result<(), CliStateError>
fn is_default(&self, name: impl AsRef<str>) -> Result<bool, CliStateError>
fn is_empty(&self) -> Result<bool, CliStateError>
fn exists(&self, name: impl AsRef<str>) -> bool
impl Eq for CredentialsState
impl StructuralEq for CredentialsState
impl StructuralPartialEq for CredentialsState
Auto Trait Implementations§
impl RefUnwindSafe for CredentialsState
impl Send for CredentialsState
impl Sync for CredentialsState
impl Unpin for CredentialsState
impl UnwindSafe for CredentialsState
Blanket Implementations§
source§impl<D> AsyncTryClone for Dwhere
D: Clone + Sync,
impl<D> AsyncTryClone for Dwhere D: Clone + Sync,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.