pub enum OrderMode {
Unordered,
Ordered,
StreamingOrdered,
MicroBatch,
}Expand description
事件输出顺序模式
Variants§
Unordered
无序模式:收到即输出,超低延迟 (10-20μs)
Ordered
有序模式:按 slot + tx_index 排序后输出 同一 slot 内的交易会等待收齐后按 tx_index 排序 延迟增加约 1-50ms(取决于 slot 内交易数量)
StreamingOrdered
流式有序模式:连续序列立即释放,低延迟 + 顺序保证 只要收到从 0 开始的连续 tx_index 序列,立即释放 延迟约 0.1-5ms,比 Ordered 低 5-50 倍
MicroBatch
微批次模式:极短时间窗口内收集事件,窗口结束后排序释放 窗口大小由 micro_batch_us 配置(默认 100μs) 延迟约 50-200μs,接近 Unordered 但保证顺序
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrderMode
impl<'de> Deserialize<'de> for OrderMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for OrderMode
impl Eq for OrderMode
impl StructuralPartialEq for OrderMode
Auto Trait Implementations§
impl Freeze for OrderMode
impl RefUnwindSafe for OrderMode
impl Send for OrderMode
impl Sync for OrderMode
impl Unpin for OrderMode
impl UnwindSafe for OrderMode
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request