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 Freeze for TrustStore
impl RefUnwindSafe for TrustStore
impl Send for TrustStore
impl Sync for TrustStore
impl Unpin for TrustStore
impl UnsafeUnpin for TrustStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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