pub struct ResolutionCandidate { /* private fields */ }Expand description
A possible resource locator considered by the resolver.
Implementations§
Source§impl ResolutionCandidate
impl ResolutionCandidate
Sourcepub fn new(
uri: impl Into<String>,
confidence: Confidence,
evidence: Vec<ResolutionEvidence>,
) -> Result<Self>
pub fn new( uri: impl Into<String>, confidence: Confidence, evidence: Vec<ResolutionEvidence>, ) -> Result<Self>
Creates a candidate with an absolute URI and at least one evidence item.
§Errors
Returns ErrorKind::InvalidArgument when uri is invalid or relative,
or when evidence is empty.
Sourcepub fn with_sequence_naming(self, naming: SequenceNaming) -> Self
pub fn with_sequence_naming(self, naming: SequenceNaming) -> Self
Records the naming of the image-sequence files the candidate was found under, so confirmation can record it with the locator.
Sourcepub const fn sequence_naming(&self) -> Option<&SequenceNaming>
pub const fn sequence_naming(&self) -> Option<&SequenceNaming>
Returns the naming of the sequence files at the candidate, present exactly for a candidate of an image-sequence resource.
Sourcepub fn with_media_root(self, name: impl Into<String>) -> Result<Self>
pub fn with_media_root(self, name: impl Into<String>) -> Result<Self>
Associates the candidate with the logical media root it was found under, so confirmation can record the portable root name.
§Errors
Returns an invalid-argument error for an invalid logical root name.
Sourcepub fn media_root(&self) -> Option<&str>
pub fn media_root(&self) -> Option<&str>
Returns the logical media root the candidate was found under, if any. A candidate found in an unnamed search directory has none.
Sourcepub const fn confidence(&self) -> Confidence
pub const fn confidence(&self) -> Confidence
Returns the deterministic confidence value.
Sourcepub fn evidence(&self) -> &[ResolutionEvidence]
pub fn evidence(&self) -> &[ResolutionEvidence]
Returns the inspectable supporting evidence.
Trait Implementations§
Source§impl Clone for ResolutionCandidate
impl Clone for ResolutionCandidate
Source§fn clone(&self) -> ResolutionCandidate
fn clone(&self) -> ResolutionCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more