pub struct Path { /* private fields */ }Expand description
A Path starts from an anchoring Certificate and consists of a list of delegation edges which lead to a target identity binding.
Implementations§
Source§impl Path
impl Path
pub fn new(start: Certificate) -> 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) -> Option<&Certification>
pub fn binding(&self) -> Option<&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 mostly 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.
pub fn edges(&self) -> impl Iterator<Item = Edge> + '_
Sourcepub fn push(&mut self, edge: Delegation)
pub fn push(&mut self, edge: Delegation)
Add a delegation edge
pub fn set_binding(&mut self, bind: Certification)
Trait Implementations§
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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