pub struct RefusingAvailabilityScopePort;Expand description
The refusing default: no availability read ever succeeds. Fail-loud — an
unwired composition surfaces the typed Unwired refusal on every scope,
never a guessed zero (which would render the whole storefront sold out)
and never a guessed abundance (which would oversell).
Trait Implementations§
Source§impl AvailabilityScopePort for RefusingAvailabilityScopePort
impl AvailabilityScopePort for RefusingAvailabilityScopePort
Source§fn display_availability<'life0, 'life1, 'async_trait>(
&'life0 self,
_item_ids: &'life1 [Uuid],
_warehouse_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScopedAvailability>, AvailabilityScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn display_availability<'life0, 'life1, 'async_trait>(
&'life0 self,
_item_ids: &'life1 [Uuid],
_warehouse_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScopedAvailability>, AvailabilityScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Display scope: fresh per-item availability at the pivot warehouse,
complete over
item_ids in input order (absent items zeroed — an
unreceived item is unavailable, not an error).Source§fn checkout_free_qty<'life0, 'life1, 'async_trait>(
&'life0 self,
_demands: &'life1 [CheckoutDemand],
_warehouse_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckoutFreeQty>, AvailabilityScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn checkout_free_qty<'life0, 'life1, 'async_trait>(
&'life0 self,
_demands: &'life1 [CheckoutDemand],
_warehouse_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckoutFreeQty>, AvailabilityScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checkout scope: fresh per-item availability at the (possibly
pickup-overridden) pivot warehouse minus the caller’s own held
quantities, floored at zero. Complete over the demand list’s items.
Source§fn sold_out<'life0, 'life1, 'async_trait>(
&'life0 self,
_item_ids: &'life1 [Uuid],
_warehouse_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<SoldOutVerdict, AvailabilityScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sold_out<'life0, 'life1, 'async_trait>(
&'life0 self,
_item_ids: &'life1 [Uuid],
_warehouse_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<SoldOutVerdict, AvailabilityScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sold-out verdict over the WHOLE item set (WSC’s first-variant-only
template check is the bug class this refuses to re-express):
sold_out = no member has availability. Policy (may an out-of-stock
item still be ordered?) stays with the caller — this is raw stock
truth.impl Copy for RefusingAvailabilityScopePort
Auto Trait Implementations§
impl Freeze for RefusingAvailabilityScopePort
impl RefUnwindSafe for RefusingAvailabilityScopePort
impl Send for RefusingAvailabilityScopePort
impl Sync for RefusingAvailabilityScopePort
impl Unpin for RefusingAvailabilityScopePort
impl UnsafeUnpin for RefusingAvailabilityScopePort
impl UnwindSafe for RefusingAvailabilityScopePort
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more