pub struct TrustSet {
pub traverse_log: Vec<TraverseLogItem>,
pub trusted: HashMap<Id, TrustedIdDetails>,
pub distrusted: HashMap<Id, DistrustedIdDetails>,
pub trust_ignore_overrides: HashMap<(Id, Id), OverrideSourcesDetails>,
pub package_review_ignore_override: HashMap<PkgVersionReviewId, OverrideSourcesDetails>,
}
Expand description
How much you (or a specific user) trusts everyone else
Fields§
§traverse_log: Vec<TraverseLogItem>
§trusted: HashMap<Id, TrustedIdDetails>
§distrusted: HashMap<Id, DistrustedIdDetails>
§trust_ignore_overrides: HashMap<(Id, Id), OverrideSourcesDetails>
§package_review_ignore_override: HashMap<PkgVersionReviewId, OverrideSourcesDetails>
Implementations§
source§impl TrustSet
impl TrustSet
pub fn from(db: &ProofDB, for_id: &Id, params: &TrustDistanceParams) -> TrustSet
pub fn iter_trusted_ids(&self) -> impl Iterator<Item = &Id>
pub fn get_trusted_ids(&self) -> HashSet<Id>
pub fn get_trusted_ids_refs(&self) -> HashSet<&Id>
pub fn is_trusted(&self, id: &Id) -> bool
pub fn is_distrusted(&self, id: &Id) -> bool
pub fn get_effective_trust_level(&self, id: &Id) -> TrustLevel
pub fn get_effective_trust_level_opt(&self, id: &Id) -> Option<TrustLevel>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrustSet
impl RefUnwindSafe for TrustSet
impl Send for TrustSet
impl Sync for TrustSet
impl Unpin for TrustSet
impl UnwindSafe for TrustSet
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> 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