#[non_exhaustive]pub struct LocalState {
pub projects: BTreeMap<String, ProjectState>,
pub touched: BTreeMap<String, i64>,
pub audit: BTreeMap<String, ChainHead>,
pub no_expiry: BTreeSet<String>,
pub pins: BTreeMap<String, Pins>,
pub rekey: Option<RekeyPlan>,
}Expand description
Everything an owner remembers between runs. No key material, ever.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.projects: BTreeMap<String, ProjectState>Project name → its pinned server, held paths and known tree.
touched: BTreeMap<String, i64>Vault id (hex) → when this client last kept it alive.
audit: BTreeMap<String, ChainHead>Vault id (hex) → the audit head this client last verified.
no_expiry: BTreeSet<String>Vault ids whose server announced no expiry at their last status; keep-alive skips them.
pins: BTreeMap<String, Pins>Vault id (hex) → the descriptor and latest record versions this client saw there.
rekey: Option<RekeyPlan>A re-root in progress, if any.
Implementations§
Source§impl LocalState
impl LocalState
Sourcepub fn project(&self, path: &EnvPath) -> Result<&ProjectState, Error>
pub fn project(&self, path: &EnvPath) -> Result<&ProjectState, Error>
The project path belongs to.
Sourcepub fn project_mut(
&mut self,
path: &EnvPath,
) -> Result<&mut ProjectState, Error>
pub fn project_mut( &mut self, path: &EnvPath, ) -> Result<&mut ProjectState, Error>
The project path belongs to, to change.
Sourcepub fn known_paths(&self) -> Vec<String>
pub fn known_paths(&self) -> Vec<String>
Every known path across all projects.
Sourcepub fn server_for_vault(&self, vault: &VaultId) -> Option<&str>
pub fn server_for_vault(&self, vault: &VaultId) -> Option<&str>
The server of the project whose tree holds vault.
Trait Implementations§
Source§impl Clone for LocalState
impl Clone for LocalState
Source§impl Debug for LocalState
impl Debug for LocalState
Source§impl Default for LocalState
impl Default for LocalState
Source§impl<'de> Deserialize<'de> for LocalState
impl<'de> Deserialize<'de> for LocalState
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
impl Eq for LocalState
Source§impl PartialEq for LocalState
impl PartialEq for LocalState
Source§impl Serialize for LocalState
impl Serialize for LocalState
impl StructuralPartialEq for LocalState
Auto Trait Implementations§
impl Freeze for LocalState
impl RefUnwindSafe for LocalState
impl Send for LocalState
impl Sync for LocalState
impl Unpin for LocalState
impl UnsafeUnpin for LocalState
impl UnwindSafe for LocalState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.