pub struct DocumentChainResult {
pub chain_id: String,
pub is_complete: bool,
pub missing_steps: Vec<String>,
pub expected_steps: usize,
pub actual_steps: usize,
}Expand description
Document chain validation result.
Fields§
§chain_id: StringChain identifier
is_complete: boolWhether chain is complete
missing_steps: Vec<String>Missing steps (if any)
expected_steps: usizeTotal steps expected
actual_steps: usizeActual steps found
Implementations§
Source§impl DocumentChainResult
impl DocumentChainResult
Sourcepub fn new(chain_id: &str, expected_steps: usize, actual_steps: usize) -> Self
pub fn new(chain_id: &str, expected_steps: usize, actual_steps: usize) -> Self
Create a new chain result.
Sourcepub fn incomplete(
chain_id: &str,
expected: usize,
actual: usize,
missing: Vec<String>,
) -> Self
pub fn incomplete( chain_id: &str, expected: usize, actual: usize, missing: Vec<String>, ) -> Self
Create an incomplete chain result.
Sourcepub fn completion_rate(&self) -> f64
pub fn completion_rate(&self) -> f64
Get completion rate.
Trait Implementations§
Source§impl Clone for DocumentChainResult
impl Clone for DocumentChainResult
Source§fn clone(&self) -> DocumentChainResult
fn clone(&self) -> DocumentChainResult
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 moreAuto Trait Implementations§
impl Freeze for DocumentChainResult
impl RefUnwindSafe for DocumentChainResult
impl Send for DocumentChainResult
impl Sync for DocumentChainResult
impl Unpin for DocumentChainResult
impl UnsafeUnpin for DocumentChainResult
impl UnwindSafe for DocumentChainResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.