pub struct ParserProgress { /* private fields */ }Expand description
One strictly ordered progress observation.
Implementations§
Source§impl ParserProgress
impl ParserProgress
Sourcepub fn new(
identity: ParserResponseIdentity,
sequence: u32,
stage: ParserProgressStage,
completed_work: u32,
total_work: Option<u32>,
) -> Result<Self, ParserProtocolError>
pub fn new( identity: ParserResponseIdentity, sequence: u32, stage: ParserProgressStage, completed_work: u32, total_work: Option<u32>, ) -> Result<Self, ParserProtocolError>
Construct one bounded progress observation.
§Errors
Returns an error for an invalid sequence or work count.
Sourcepub fn validate_for(
&self,
request: &ParserRequest,
previous: Option<&Self>,
) -> Result<ParserProgressDisposition, ParserProtocolError>
pub fn validate_for( &self, request: &ParserRequest, previous: Option<&Self>, ) -> Result<ParserProgressDisposition, ParserProtocolError>
Validate request identity and monotonic progress semantics.
A valid message that advances only its sequence returns
ParserProgressDisposition::NoProgress, allowing the supervisor to
distinguish liveness traffic from meaningful forward progress.
§Errors
Returns an error for identity mismatch, non-contiguous sequence, stage/count regression, or a changing total-work claim.
Trait Implementations§
Source§impl Clone for ParserProgress
impl Clone for ParserProgress
Source§fn clone(&self) -> ParserProgress
fn clone(&self) -> ParserProgress
Returns a duplicate of the value. Read more
1.0.0 · 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 ParserProgress
impl Debug for ParserProgress
Source§impl<'de> Deserialize<'de> for ParserProgress
impl<'de> Deserialize<'de> for ParserProgress
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ParserProgress
impl PartialEq for ParserProgress
Source§impl Serialize for ParserProgress
impl Serialize for ParserProgress
impl Eq for ParserProgress
impl StructuralPartialEq for ParserProgress
Auto Trait Implementations§
impl Freeze for ParserProgress
impl RefUnwindSafe for ParserProgress
impl Send for ParserProgress
impl Sync for ParserProgress
impl Unpin for ParserProgress
impl UnwindSafe for ParserProgress
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.