pub struct Home { /* private fields */ }Expand description
Radicle home.
Implementations§
Source§impl Home
impl Home
Sourcepub fn new(home: impl Into<PathBuf>) -> Result<Self, Error>
pub fn new(home: impl Into<PathBuf>) -> Result<Self, Error>
Creates the Radicle Home directories.
The home path is used as the base directory for all
necessary subdirectories.
If home does not already exist then it and any
subdirectories are created using fs::create_dir_all.
The home path is also canonicalized using fs::canonicalize.
All necessary subdirectories are also created.
pub fn path(&self) -> &Path
pub fn storage(&self) -> PathBuf
pub fn config(&self) -> PathBuf
pub fn keys(&self) -> PathBuf
pub fn node(&self) -> PathBuf
pub fn cobs(&self) -> PathBuf
pub fn socket(&self) -> PathBuf
Sourcepub fn notifications_mut(&self) -> Result<StoreWriter, Error>
pub fn notifications_mut(&self) -> Result<StoreWriter, Error>
Return a read-write handle to the notifications database.
Sourcepub fn policies_mut(&self) -> Result<StoreWriter, Error>
pub fn policies_mut(&self) -> Result<StoreWriter, Error>
Return a read-write handle to the policies store of the node.
Sourcepub fn database(&self) -> Result<Database, Error>
pub fn database(&self) -> Result<Database, Error>
Return a handle to a read-only database of the node.
Sourcepub fn database_mut(&self) -> Result<Database, Error>
pub fn database_mut(&self) -> Result<Database, Error>
Return a handle to the database of the node.
Sourcepub fn routing_mut(&self) -> Result<impl Store, Error>
pub fn routing_mut(&self) -> Result<impl Store, Error>
Returns the routing store, mutably.
Sourcepub fn cobs_db(&self) -> Result<StoreReader, Error>
pub fn cobs_db(&self) -> Result<StoreReader, Error>
Get read access to the COBs cache.
Sourcepub fn cobs_db_mut(&self) -> Result<StoreWriter, Error>
pub fn cobs_db_mut(&self) -> Result<StoreWriter, Error>
Get write access to the COBs cache.
Sourcepub fn issues<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Issues<'a, R>, StoreReader>, Error>
pub fn issues<'a, R>( &self, repository: &'a R, ) -> Result<Cache<Issues<'a, R>, StoreReader>, Error>
Return a read-only handle for the issues cache.
Sourcepub fn issues_mut<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Issues<'a, R>, StoreWriter>, Error>
pub fn issues_mut<'a, R>( &self, repository: &'a R, ) -> Result<Cache<Issues<'a, R>, StoreWriter>, Error>
Return a read-write handle for the issues cache.
Sourcepub fn patches<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Patches<'a, R>, StoreReader>, Error>
pub fn patches<'a, R>( &self, repository: &'a R, ) -> Result<Cache<Patches<'a, R>, StoreReader>, Error>
Return a read-only handle for the patches cache.
Sourcepub fn patches_mut<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Patches<'a, R>, StoreWriter>, Error>
pub fn patches_mut<'a, R>( &self, repository: &'a R, ) -> Result<Cache<Patches<'a, R>, StoreWriter>, Error>
Return a read-write handle for the patches cache.