pub struct Home { /* private fields */ }Expand description
Radicle home.
Implementations§
Source§impl Home
impl Home
Sourcepub fn new(home: impl Into<PathBuf>) -> Result<Home, Error>
pub fn new(home: impl Into<PathBuf>) -> Result<Home, 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
Sourcepub fn storage(&self) -> PathBuf
pub fn storage(&self) -> PathBuf
The /storage directory under Home::path.
Sourcepub fn config(&self) -> PathBuf
pub fn config(&self) -> PathBuf
The config.json file path under Home::path.
Sourcepub fn keys(&self) -> PathBuf
pub fn keys(&self) -> PathBuf
The /keys directory under Home::path.
Sourcepub fn node(&self) -> PathBuf
pub fn node(&self) -> PathBuf
The /node directory under Home::path.
Sourcepub fn cobs(&self) -> PathBuf
pub fn cobs(&self) -> PathBuf
The /cobs directory under Home::path.
pub fn socket(&self) -> PathBuf
Sourcepub fn notifications_mut(&self) -> Result<Store<Write>, Error>
pub fn notifications_mut(&self) -> Result<Store<Write>, Error>
Return a read-write handle to the notifications database.
Sourcepub fn policies_mut(&self) -> Result<Store<Write>, Error>
pub fn policies_mut(&self) -> Result<Store<Write>, Error>
Return a read-write handle to the policies store of the node.
Sourcepub fn database(&self, config: Config) -> Result<Database, Error>
pub fn database(&self, config: Config) -> Result<Database, Error>
Return a handle to a read-only database of the node.
Sourcepub fn database_mut(&self, config: Config) -> Result<Database, Error>
pub fn database_mut(&self, config: Config) -> Result<Database, Error>
Return a handle to the database of the node.
Sourcepub fn addresses(&self, config: Config) -> Result<impl Store, Error>
pub fn addresses(&self, config: Config) -> Result<impl Store, Error>
Returns the address store.
Sourcepub fn routing_mut(&self, config: Config) -> Result<impl Store, Error>
pub fn routing_mut(&self, config: Config) -> Result<impl Store, Error>
Returns the routing store, mutably.
Sourcepub fn issues<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Issues<'a, R>, Store<Read>>, Error>
pub fn issues<'a, R>( &self, repository: &'a R, ) -> Result<Cache<Issues<'a, R>, Store<Read>>, 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>, Store<Write>>, Error>
pub fn issues_mut<'a, R>( &self, repository: &'a R, ) -> Result<Cache<Issues<'a, R>, Store<Write>>, Error>
Return a read-write handle for the issues cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Home
impl RefUnwindSafe for Home
impl Send for Home
impl Sync for Home
impl Unpin for Home
impl UnsafeUnpin for Home
impl UnwindSafe for Home
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more