pub struct WorkspaceRegistry {
pub workspace: Vec<WorkspaceRecord>,
}Expand description
Persistent registry of all known workspaces and their creation timestamps.
Fields§
§workspace: Vec<WorkspaceRecord>Registered workspaces.
Implementations§
Source§impl WorkspaceRegistry
impl WorkspaceRegistry
Sourcepub fn path() -> Result<PathBuf>
pub fn path() -> Result<PathBuf>
Return the path to the workspace registry file
(~/.config/worktree/workspaces.toml).
§Errors
Returns an error if the home directory cannot be determined.
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load the registry from disk; returns an empty registry when absent.
§Errors
Returns an error if the file cannot be read or parsed.
Trait Implementations§
Source§impl Clone for WorkspaceRegistry
impl Clone for WorkspaceRegistry
Source§fn clone(&self) -> WorkspaceRegistry
fn clone(&self) -> WorkspaceRegistry
Returns a duplicate 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 WorkspaceRegistry
impl Debug for WorkspaceRegistry
Source§impl Default for WorkspaceRegistry
impl Default for WorkspaceRegistry
Source§fn default() -> WorkspaceRegistry
fn default() -> WorkspaceRegistry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WorkspaceRegistrywhere
WorkspaceRegistry: Default,
impl<'de> Deserialize<'de> for WorkspaceRegistrywhere
WorkspaceRegistry: Default,
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 Freeze for WorkspaceRegistry
impl RefUnwindSafe for WorkspaceRegistry
impl Send for WorkspaceRegistry
impl Sync for WorkspaceRegistry
impl Unpin for WorkspaceRegistry
impl UnsafeUnpin for WorkspaceRegistry
impl UnwindSafe for WorkspaceRegistry
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