pub struct ResultAggregator { /* private fields */ }Expand description
Bounded completion-receipt result store.
Implementations§
Source§impl ResultAggregator
impl ResultAggregator
pub fn new() -> Self
pub fn with_limits(limits: ResultLimits) -> Result<Self, DistributedError>
Sourcepub fn store_result(
&self,
expected_revision: u64,
receipt: &CompletionReceipt,
bytes: Vec<u8>,
) -> Result<Transition<StoreResultOutcome>, DistributedError>
pub fn store_result( &self, expected_revision: u64, receipt: &CompletionReceipt, bytes: Vec<u8>, ) -> Result<Transition<StoreResultOutcome>, DistributedError>
Store a result only with a completion receipt. Exact same-byte replay is idempotent; a different receipt or bytes for an occupied task ID fails. Receipt provenance remains scoped to the caller-enforced coordinator epoch.
Sourcepub fn aggregate_results(
&self,
task_ids: &[&str],
) -> Result<Vec<AggregatedResult>, DistributedError>
pub fn aggregate_results( &self, task_ids: &[&str], ) -> Result<Vec<AggregatedResult>, DistributedError>
Aggregate all requested results in exact input order. Missing or repeated task IDs are explicit errors rather than silent filtering.
pub fn get_result( &self, task_id: &str, ) -> Result<Option<Vec<u8>>, DistributedError>
pub fn revision(&self) -> Result<u64, DistributedError>
pub fn result_count(&self) -> Result<usize, DistributedError>
pub fn total_bytes(&self) -> Result<usize, DistributedError>
Trait Implementations§
Source§impl Clone for ResultAggregator
impl Clone for ResultAggregator
Source§fn clone(&self) -> ResultAggregator
fn clone(&self) -> ResultAggregator
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 ResultAggregator
impl RefUnwindSafe for ResultAggregator
impl Send for ResultAggregator
impl Sync for ResultAggregator
impl Unpin for ResultAggregator
impl UnsafeUnpin for ResultAggregator
impl UnwindSafe for ResultAggregator
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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