pub struct SplitEmitter<'a> { /* private fields */ }Expand description
Stack-borrowed emitter handed to a route
closure.
emit routes one derived record to the branch named by a
SplitBranch<F> handle; a record that emits to no branch triggers the
split’s unmatched policy. One Any downcast per emit, no per-call name
lookup.
Implementations§
Source§impl SplitEmitter<'_>
impl SplitEmitter<'_>
Sourcepub fn emit<'buf, F: RecFamily + 'static>(
&mut self,
handle: SplitBranch<F>,
row: F::Rec<'buf>,
)
pub fn emit<'buf, F: RecFamily + 'static>( &mut self, handle: SplitBranch<F>, row: F::Rec<'buf>, )
Route one derived record to handle’s branch, inheriting the parent’s
metadata and acknowledgment handle. Emitting to no branch (returning
from the closure without any emit) invokes the unmatched policy.
Once a branch of this split holds a fatal, every later emit in the
payload is dropped until the chain drains it.
§Panics
Panics if handle’s index lies past this split’s branches, or its
record family does not match the branch at that index. A handle minted
by another split’s builder whose index and family match a branch of
this split routes to that branch without a panic.
Sourcepub fn meta(&self) -> RecordMeta
pub fn meta(&self) -> RecordMeta
The parent record’s metadata.