pub struct Network {
pub certifications: HashMap<Binding, Vec<Certification>>,
pub delegations: HashMap<CertId, Vec<Delegation>>,
}Expand description
A “Web of Trust” network consisting of Certifications and Delegations.
A Network represents a snapshot of valid nodes and edges in a set of OpenPGP Certificates at a reference time.
NOTE:
Users have to create the network and ensure validity of all nodes and edges themselves at the reference time themselves. Users also have to filter out all edges that are not in effect for a given reference time.
Fields§
§certifications: HashMap<Binding, Vec<Certification>>§delegations: HashMap<CertId, Vec<Delegation>>Implementations§
Source§impl Network
impl Network
pub fn new() -> Self
pub fn num_edges(&self) -> usize
pub fn add_binding( &mut self, issuer: CertId, target_cert: CertId, target_user_id: UserId, trust_amount: u8, )
pub fn add_delegation( &mut self, issuer: CertId, target_cert: CertId, trust_amount: u8, trust_depth: TrustDepth, regexes: Vec<Regex>, )
Trait Implementations§
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnwindSafe for Network
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