pub struct TrustStore { /* private fields */ }Expand description
Trust store that manages trust decisions for multiple projects.
Implementations§
Source§impl TrustStore
impl TrustStore
Sourcepub fn load(&self) -> Result<(), TrustError>
pub fn load(&self) -> Result<(), TrustError>
Load trust decisions from disk.
Sourcepub fn save(&self) -> Result<(), TrustError>
pub fn save(&self) -> Result<(), TrustError>
Save trust decisions to disk.
Sourcepub fn get_decision(&self, project_path: &Path) -> TrustDecision
pub fn get_decision(&self, project_path: &Path) -> TrustDecision
Get the trust decision for a project.
Sourcepub fn set_decision(
&self,
project_path: &Path,
decision: TrustDecision,
decided_by: Option<String>,
) -> Result<(), TrustError>
pub fn set_decision( &self, project_path: &Path, decision: TrustDecision, decided_by: Option<String>, ) -> Result<(), TrustError>
Set the trust decision for a project.
Sourcepub fn is_trusted(&self, project_path: &Path) -> bool
pub fn is_trusted(&self, project_path: &Path) -> bool
Check if a project is trusted.
Sourcepub fn remove_decision(&self, project_path: &Path) -> Result<(), TrustError>
pub fn remove_decision(&self, project_path: &Path) -> Result<(), TrustError>
Remove the trust decision for a project.
Sourcepub fn all_decisions(&self) -> Vec<ProjectTrust>
pub fn all_decisions(&self) -> Vec<ProjectTrust>
Get all trust decisions.
Trait Implementations§
Source§impl Clone for TrustStore
impl Clone for TrustStore
Auto Trait Implementations§
impl Forget for TrustStore
impl Freeze for TrustStorewhere
*const ArcInner<RwLock<HashMap<String, ProjectTrust>>> is !null: Freeze,
PhantomData<ArcInner<RwLock<HashMap<String, ProjectTrust>>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for TrustStore
impl RefUnwindSafe for TrustStore
impl Send for TrustStore
impl Sync for TrustStore
impl Unpin for TrustStore
impl UnsafeUnpin for TrustStorewhere
*const ArcInner<RwLock<HashMap<String, ProjectTrust>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<HashMap<String, ProjectTrust>>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for TrustStore
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