pub struct Profile {
pub home: Home,
pub storage: Storage,
pub keystore: Keystore,
pub public_key: PublicKey,
pub config: Config,
}
Fields§
§home: Home
§storage: Storage
§keystore: Keystore
§public_key: PublicKey
§config: Config
Implementations§
source§impl Profile
impl Profile
pub fn init( home: Home, alias: Alias, passphrase: Option<Passphrase>, seed: Seed, ) -> Result<Self, Error>
pub fn load() -> Result<Self, Error>
pub fn id(&self) -> &PublicKey
pub fn info(&self) -> UserInfo
pub fn hints(&self) -> bool
pub fn did(&self) -> Did
pub fn signer(&self) -> Result<Box<dyn Signer>, Error>
sourcepub fn policies(&self) -> Result<Config<Read>, Error>
pub fn policies(&self) -> Result<Config<Read>, Error>
Return a read-only handle to the policies of the node.
sourcepub fn add_inventory(&self, rid: RepoId, node: &mut Node) -> Result<bool, Error>
pub fn add_inventory(&self, rid: RepoId, node: &mut Node) -> Result<bool, Error>
Add the repo to our inventory. If the node is offline, adds it directly to the database.
Methods from Deref<Target = Home>§
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 issues<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Issues<'a, R>, StoreReader>, Error>where
R: ReadRepository + Store,
pub fn issues<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Issues<'a, R>, StoreReader>, Error>where
R: ReadRepository + Store,
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>where
R: ReadRepository + Store,
pub fn issues_mut<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Issues<'a, R>, StoreWriter>, Error>where
R: ReadRepository + Store,
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>where
R: ReadRepository + Store,
pub fn patches<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Patches<'a, R>, StoreReader>, Error>where
R: ReadRepository + Store,
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>where
R: ReadRepository + Store,
pub fn patches_mut<'a, R>(
&self,
repository: &'a R,
) -> Result<Cache<Patches<'a, R>, StoreWriter>, Error>where
R: ReadRepository + Store,
Return a read-write handle for the patches cache.
Trait Implementations§
source§impl AliasStore for Profile
impl AliasStore for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnwindSafe for Profile
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)