pub struct Network {
pub certifications: HashMap<Binding, Vec<Certification>>,
pub delegations: HashMap<Certificate, 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 of this crate are expected to create a wot-network
graph from OpenPGP certificates.
This involves applying all relevant OpenPGP semantics and forming a network of exactly
those nodes and edges that are valid and active at the reference time.
Fields§
§certifications: HashMap<Binding, Vec<Certification>>
§delegations: HashMap<Certificate, 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: Certificate, target_cert: Certificate, target_user_id: Identity, )
pub fn add_delegation( &mut self, issuer: Certificate, target_cert: Certificate, 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