pub struct OriginSink<'a> { /* private fields */ }Expand description
Sink decorator that stamps the provenance of everything a producer emits, and refuses whatever it cannot stamp.
The fight primitives below always build CombatEventOrigin::Core and know
nothing about modifiers. A modifier runs its work against
OriginSink::proc(real_sink) instead, so everything it emits — directly or
through a nested primitive — comes out Proc without any call site
threading the marker.
Casts and runs are carried, not refused: push_attack / push_run write the
scope’s provenance into the queued cast, which reaches
essences::entity::ActionWithDeadline, so the damage it lands ticks later
still resolves under this scope’s mark.
The sink fails closed for events it cannot mark: a non-Core scope may only
emit events OverlordEvent::set_origin accepts. CastEffectFromEvent has
no field of its own to stamp and SpawnEntity would hand a producer a
combatant fighting with its own Core actions, so both are refused. A Core
scope is unrestricted — Core is what every emit site already builds.
Implementations§
Source§impl<'a> OriginSink<'a>
impl<'a> OriginSink<'a>
Trait Implementations§
Source§impl FightSink for OriginSink<'_>
impl FightSink for OriginSink<'_>
Source§fn claim_once(&mut self, slot: OnceSlot, armed: i64) -> i64
fn claim_once(&mut self, slot: OnceSlot, armed: i64) -> i64
Forwarded, not re-latched: the budget belongs to the dispatch, and a producer scope running inside one is part of that same dispatch.
fn push_event(&mut self, event: OverlordEvent) -> Result<(), Error>
fn push_attack( &mut self, delay: u64, duration: u64, target: Uuid, origin: CombatEventOrigin, ) -> Result<(), Error>
fn push_run( &mut self, coords: Coordinates, duration: u64, origin: CombatEventOrigin, ) -> Result<(), Error>
Auto Trait Implementations§
impl<'a> Freeze for OriginSink<'a>
impl<'a> !RefUnwindSafe for OriginSink<'a>
impl<'a> !Send for OriginSink<'a>
impl<'a> !Sync for OriginSink<'a>
impl<'a> Unpin for OriginSink<'a>
impl<'a> !UnwindSafe for OriginSink<'a>
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].