pub struct ResourceResolution { /* private fields */ }Expand description
An explainable result for one resource, independent of representation shape.
Implementations§
Source§impl ResourceResolution
impl ResourceResolution
Sourcepub fn new(
resource_id: ResourceId,
state: ResourceResolutionState,
candidates: Vec<ResolutionCandidate>,
evidence: Vec<ResolutionEvidence>,
) -> Result<Self>
pub fn new( resource_id: ResourceId, state: ResourceResolutionState, candidates: Vec<ResolutionCandidate>, evidence: Vec<ResolutionEvidence>, ) -> Result<Self>
Creates a resource result and sorts candidates deterministically.
§Errors
Returns ErrorKind::InvalidArgument when the candidate count is
inconsistent with state.
Sourcepub fn with_missing_frames(self, missing_frames: Vec<i64>) -> Result<Self>
pub fn with_missing_frames(self, missing_frames: Vec<i64>) -> Result<Self>
Adds observed missing image-sequence frames in canonical order.
§Errors
Returns ErrorKind::InvalidArgument when the diagnostic exceeds the
bounded sequence-exception limit.
Sourcepub const fn resource_id(&self) -> ResourceId
pub const fn resource_id(&self) -> ResourceId
Returns the resolved resource identity.
Sourcepub const fn state(&self) -> ResourceResolutionState
pub const fn state(&self) -> ResourceResolutionState
Returns the resource outcome.
Sourcepub fn candidates(&self) -> &[ResolutionCandidate]
pub fn candidates(&self) -> &[ResolutionCandidate]
Returns candidates in deterministic best-first order.
Sourcepub fn evidence(&self) -> &[ResolutionEvidence]
pub fn evidence(&self) -> &[ResolutionEvidence]
Returns resource-wide evidence and diagnostics.
Sourcepub fn missing_frames(&self) -> &[i64]
pub fn missing_frames(&self) -> &[i64]
Returns sorted frames observed absent while resolving this resource.
Trait Implementations§
Source§impl Clone for ResourceResolution
impl Clone for ResourceResolution
Source§fn clone(&self) -> ResourceResolution
fn clone(&self) -> ResourceResolution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceResolution
impl Debug for ResourceResolution
impl Eq for ResourceResolution
Source§impl PartialEq for ResourceResolution
impl PartialEq for ResourceResolution
Source§fn eq(&self, other: &ResourceResolution) -> bool
fn eq(&self, other: &ResourceResolution) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResourceResolution
Auto Trait Implementations§
impl Freeze for ResourceResolution
impl RefUnwindSafe for ResourceResolution
impl Send for ResourceResolution
impl Sync for ResourceResolution
impl Unpin for ResourceResolution
impl UnsafeUnpin for ResourceResolution
impl UnwindSafe for ResourceResolution
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