#[non_exhaustive]pub enum SourceEvent<L> {
LanesAssigned(Vec<L>),
LanesRevoked {
lanes: Vec<LaneId>,
barrier: DrainBarrier,
},
Idle,
}Expand description
Control-plane event returned by Source::poll_events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LanesAssigned(Vec<L>)
New lanes were assigned; the runtime distributes them across pipeline threads. The source bumps its assignment epoch first.
LanesRevoked
Lanes are being revoked. The runtime trips the DrainBarrier for
the owning threads, which stop the lanes, flush in-flight records,
and arrive; the source completes the revocation (final synchronous
commit included) only after DrainBarrier::wait returns.
Fields
§
barrier: DrainBarrierBarrier the owning pipeline threads arrive at once drained.
Idle
Nothing happened within the timeout.
Trait Implementations§
Auto Trait Implementations§
impl<L> Freeze for SourceEvent<L>
impl<L> RefUnwindSafe for SourceEvent<L>where
L: RefUnwindSafe,
impl<L> Send for SourceEvent<L>where
L: Send,
impl<L> Sync for SourceEvent<L>where
L: Sync,
impl<L> Unpin for SourceEvent<L>where
L: Unpin,
impl<L> UnsafeUnpin for SourceEvent<L>
impl<L> UnwindSafe for SourceEvent<L>where
L: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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