#[non_exhaustive]pub struct ProjectState {
pub server: String,
pub held: Vec<String>,
pub tree: BTreeMap<String, TreeNode>,
}Expand description
One project: its pinned server, the paths whose keys are held, and the known tree.
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.server: StringPinned at init, import or recover; never taken from anywhere else.
held: Vec<String>Paths whose keys are in the key store: the project root, or nodes imported from delegation kits.
tree: BTreeMap<String, TreeNode>The known tree, path → vault. Refreshed by rediscovery.
Implementations§
Source§impl ProjectState
impl ProjectState
Sourcepub fn new(server: impl Into<String>) -> ProjectState
pub fn new(server: impl Into<String>) -> ProjectState
A project pinned to server, with nothing held or known yet.
Sourcepub fn held_root_for(&self, path: &EnvPath) -> Option<EnvPath>
pub fn held_root_for(&self, path: &EnvPath) -> Option<EnvPath>
The deepest held path at or above path.
Sourcepub fn descendants(&self, path: &EnvPath) -> Vec<EnvPath>
pub fn descendants(&self, path: &EnvPath) -> Vec<EnvPath>
Known paths strictly below path, deepest first.
Sourcepub fn children_of(&self, path: &EnvPath) -> Vec<EnvPath>
pub fn children_of(&self, path: &EnvPath) -> Vec<EnvPath>
Known paths directly below path.
Trait Implementations§
Source§impl Clone for ProjectState
impl Clone for ProjectState
Source§impl Debug for ProjectState
impl Debug for ProjectState
Source§impl<'de> Deserialize<'de> for ProjectState
impl<'de> Deserialize<'de> for ProjectState
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 ProjectState
Source§impl PartialEq for ProjectState
impl PartialEq for ProjectState
Source§impl Serialize for ProjectState
impl Serialize for ProjectState
impl StructuralPartialEq for ProjectState
Auto Trait Implementations§
impl Freeze for ProjectState
impl RefUnwindSafe for ProjectState
impl Send for ProjectState
impl Sync for ProjectState
impl Unpin for ProjectState
impl UnsafeUnpin for ProjectState
impl UnwindSafe for ProjectState
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.