Skip to main content

CostLayers

Struct CostLayers 

Source
pub struct CostLayers { /* private fields */ }
Expand description

The cost of every issue, consuming the oldest units received first.

cost-layers: FIFO consumption order is the fold, so what an issue cost depends on which receipt arrived first, and no order exists that two peers both hold. It is correct and it is not convergent, so it does not implement ConvergentProjection, and that absence is its SY-22 declaration.

Trait Implementations§

Source§

impl Debug for CostLayers

Source§

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

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

impl Projection for CostLayers

Source§

type Event = Stock

The application’s own event enum. Not Bytes: the runner decodes.
Source§

type Store = MemoryProjectionStore

The store this read model and its checkpoint live in.
Source§

type Error = MemoryProjectionStoreError

The projection’s own refusal (PS-28). Read more
Source§

fn id(&self) -> &ProjectionId

The projection’s name: which read model this is, within Self::Store. Read more
Source§

fn scope(&self) -> &Tags

The tags this projection is scoped to, already validated. Read more
Source§

async fn apply( &mut self, event: Delivered<Stock>, batch: &mut MemoryProjectionBatch, ) -> Result<(), MemoryProjectionStoreError>

Applies one delivered event into the store’s open write set. Read more
Source§

fn on_error( &mut self, failure: &ApplyFailure<'_, Self::Error>, batch: &mut <Self::Store as ProjectionStore>::Batch, ) -> impl Future<Output = Result<Policy, Self::Error>>

Decides what happens to an event that could not be decoded or applied. Read more

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V