Skip to main content

RateAtFinalizationStore

Struct RateAtFinalizationStore 

Source
pub struct RateAtFinalizationStore(pub Arc<Store>);
Expand description

The reference store with max_rate admission moved into the finalization compare-and-set (V2RateAtFinalizationStore). Use it as both the claim store and the rate store.

Tuple Fields§

§0: Arc<Store>

Trait Implementations§

Source§

impl ClaimStoreV2 for RateAtFinalizationStore

Source§

fn claim_v2( &self, ctx: &V2Context, claim: V2ChallengeClaim, ) -> Result<V2ClaimResult, V2StoreError>

Source§

fn finalize_v2_claim( &self, ctx: &V2Context, claim_id: &str, owner_token: &[u8], terminal_result: &[u8], receipt_body: &[u8], allow_valid_until: i64, ) -> Result<bool, V2StoreError>

Source§

fn record_v2_evaluation_progress( &self, ctx: &V2Context, claim_id: &str, owner_token: &[u8], progress: V2EvaluationProgress, ) -> Result<(), V2StoreError>

Source§

fn load_v2_interrupted_claim( &self, ctx: &V2Context, claim_id: &str, ) -> Result<V2InterruptedClaim, V2StoreError>

Source§

fn recover_interrupted_v2_claim( &self, ctx: &V2Context, claim_id: &str, terminal_result: &[u8], receipt_body: &[u8], ) -> Result<bool, V2StoreError>

Source§

fn rate_at_finalization_view(&self) -> Option<&dyn V2RateAtFinalizationStore>

Go’s store.(V2RateAtFinalizationStore) type assertion: a store that implements V2RateAtFinalizationStore returns Some(self).
Source§

impl Debug for RateAtFinalizationStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl V2AuthoritativeClock for RateAtFinalizationStore

Source§

impl V2CommittedClaimStore for RateAtFinalizationStore

Source§

impl V2RateAtFinalizationStore for RateAtFinalizationStore

Source§

impl V2RateReservationStore for RateAtFinalizationStore

Source§

fn reserve_v2_rate_batch( &self, _ctx: &V2Context, _claim_id: &str, _owner_token: &[u8], _bundle_hash: &str, _batch: &[V2RateReservation], ) -> Result<(), V2StoreError>

Exists only to satisfy V2RateReservationStore. The verifier never calls it for a store that admits at finalization, and it always fails (SPEC-v2 §7.1, §7.6).

Source§

fn rate_at_finalization_view(&self) -> Option<&dyn V2RateAtFinalizationStore>

Go’s store.(V2RateAtFinalizationStore) type assertion: a store that implements V2RateAtFinalizationStore returns Some(self).
Source§

impl V2ReleaseClaimStore for RateAtFinalizationStore

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.