pub struct Path {
pub start: Certificate,
pub delegations: Vec<Delegation>,
pub certification: Certification,
}Expand description
A Path starts from an anchoring Certificate and consists of a list of delegation edges which lead to a target identity binding.
Fields§
§start: Certificate§delegations: Vec<Delegation>§certification: CertificationImplementations§
Source§impl Path
impl Path
pub fn new( start: Certificate, delegations: Vec<Delegation>, certification: Certification, ) -> Self
Sourcepub fn first(&self) -> &Certificate
pub fn first(&self) -> &Certificate
First cert of the path.
Sourcepub fn delegations(&self) -> &[Delegation]
pub fn delegations(&self) -> &[Delegation]
The list of delegation edges that lead from the anchor to the target binding
Sourcepub fn binding(&self) -> &Certification
pub fn binding(&self) -> &Certification
The target binding of this Path
Sourcepub fn certificates(&self) -> Vec<&Certificate>
pub fn certificates(&self) -> Vec<&Certificate>
A list of certificates in this Path, from the starting Certificate, followed by all Delegation edge target Certificates, and the target Certificate in the final Certification edge.
This list format is mainly intended for informal uses, such as comparing test results with expected paths.
Sourcepub fn length(&self) -> usize
pub fn length(&self) -> usize
The length of this path, counted in nodes: A path with a single edge from node A to node B is of length 2.
Sourcepub fn edges(&self) -> impl Iterator<Item = Edge> + '_
pub fn edges(&self) -> impl Iterator<Item = Edge> + '_
An iterator over all edges in this path.
This always returns a series of zero or more Edge::Delegations,
followed by exactly one Edge::Certification.