pub struct FanoutRouter<const N: usize> { /* private fields */ }Expand description
Fanout router handle.
This is a single-step primitive; long-running routing loops live in indexbus-route.
Implementations§
Source§impl<const N: usize> FanoutRouter<N>
impl<const N: usize> FanoutRouter<N>
Sourcepub fn route_once_with(&self, source: RouterSource, mode: RouterMode) -> bool
pub fn route_once_with(&self, source: RouterSource, mode: RouterMode) -> bool
Route a single event.
Returns true if an event was consumed from the source queue.
Ordering for a given consumer matches the router’s routing order.
Sourcepub fn route_once_with_stats(
&self,
source: RouterSource,
mode: RouterMode,
) -> RouteOnceResult
pub fn route_once_with_stats( &self, source: RouterSource, mode: RouterMode, ) -> RouteOnceResult
Route a single event and return delivery statistics.
Sourcepub fn route_once_with_credit_masks(
&self,
source: RouterSource,
mode: RouterMode,
eligible_mask: u64,
no_credit_mask: u64,
full_mask: u64,
) -> RouteOnceCreditResult
pub fn route_once_with_credit_masks( &self, source: RouterSource, mode: RouterMode, eligible_mask: u64, no_credit_mask: u64, full_mask: u64, ) -> RouteOnceCreditResult
Credit-aware routing step.
eligible_mask marks which consumers are eligible for delivery.
no_credit_mask marks consumers that are explicitly ineligible due to exhausted credit.
full_mask marks consumers whose destination queues are full.
The router will attempt to deliver only to eligible_mask consumers.
Trait Implementations§
impl<const N: usize> Send for FanoutRouter<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for FanoutRouter<N>
impl<const N: usize> !RefUnwindSafe for FanoutRouter<N>
impl<const N: usize> !Sync for FanoutRouter<N>
impl<const N: usize> Unpin for FanoutRouter<N>
impl<const N: usize> !UnwindSafe for FanoutRouter<N>
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