pub struct PathLints<'a> { /* private fields */ }Expand description
A linted path.
This is returned by Network::lint_path.
The lifetimes 'a and 'b have the same meaning as for
Store: 'a is the lifetime of the object on the backend, 'b
is the lifetime of the reference to the object, and the object
('a) must outlive the reference ('b).
Implementations§
Source§impl<'a> PathLints<'a>
impl<'a> PathLints<'a>
Sourcepub fn certification_network(&self) -> bool
pub fn certification_network(&self) -> bool
Returns whether the path is in a certification network.
In a certification network, depth constraints and regular expressions are ignored.
Sourcepub fn certs(&self) -> impl Iterator<Item = &CertLints<'a>>
pub fn certs(&self) -> impl Iterator<Item = &CertLints<'a>>
Returns an iterator over the certificates.
Sourcepub fn certifications(&self) -> impl Iterator<Item = &CertificationLints>
pub fn certifications(&self) -> impl Iterator<Item = &CertificationLints>
Returns an iterator over the certifications.
Sourcepub fn amount(&self) -> usize
pub fn amount(&self) -> usize
Returns the amount that the target is trusted.
120 usually means fully trusted. This function checks that there are no errors, that each certification’s depth parameter is sufficient for the rest of the path, and that the regular expression constraints are respected.
Sourcepub fn to_path(self) -> Result<Path>
pub fn to_path(self) -> Result<Path>
Converts the PathLints into a Path.
This fails if the path is invalid. Note: the path is still
considered valid even if it doesn’t have the required trust
amount as passed to Network::lint_path.
There may be multiple reasons why a path is invalid. This function tries to return the first (when checking from the root towards the target) reason why it is not valid.