pub struct BackoffNoticePayload {
pub min_backoff_ns: u64,
pub cause: BackoffCauseWire,
pub suggested_next_send_ns: u64,
}Expand description
Wire-encoded BackoffNotice payload.
One of these rides as the sole SlotFill.payload of a
BackoffNotice envelope. Field semantics:
min_backoff_ns- minimum back-off duration the receiver is asking the sender to observe before its next envelope. The sender’sBackoffTabletranslates this into anext_retry_nsso the existingBackoffGateTxalready gates outbound sends.cause- why the receiver is requesting back-off.suggested_next_send_ns- optional wall-clock hint (engine-ns since epoch) the receiver believes it will be ready by.Nonewhen the receiver has no estimate.
The payload uses bincode serialization (the universal
SlotValue::to_wire_bytes impl at
bb-ir/src/slot_value.rs:194-196 already routes through bincode),
and the discriminator backoff_notice_type_hash is identical
on both sides because it derives from
std::any::type_name::<BackoffNoticePayload>() via FNV-1a.
Fields§
§min_backoff_ns: u64Minimum back-off duration in nanoseconds.
cause: BackoffCauseWireWhy the receiver is requesting back-off.
suggested_next_send_ns: u64Optional wall-clock hint (engine-ns since epoch) the receiver
expects to be ready by. 0 encodes None.
Implementations§
Source§impl BackoffNoticePayload
impl BackoffNoticePayload
Sourcepub fn new(
min_backoff_ns: u64,
cause: BackoffCause,
suggested_next_send_ns: Option<u64>,
) -> Self
pub fn new( min_backoff_ns: u64, cause: BackoffCause, suggested_next_send_ns: Option<u64>, ) -> Self
Construct a payload, encoding None as 0 per the field
docstring.
Sourcepub fn suggested_next_send(&self) -> Option<u64>
pub fn suggested_next_send(&self) -> Option<u64>
Recover the optional wall-clock hint.
Sourcepub fn cause(&self) -> BackoffCause
pub fn cause(&self) -> BackoffCause
Recover the framework-side BackoffCause.
Trait Implementations§
Source§impl Clone for BackoffNoticePayload
impl Clone for BackoffNoticePayload
Source§fn clone(&self) -> BackoffNoticePayload
fn clone(&self) -> BackoffNoticePayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BackoffNoticePayload
Source§impl Debug for BackoffNoticePayload
impl Debug for BackoffNoticePayload
Source§impl<'de> Deserialize<'de> for BackoffNoticePayload
impl<'de> Deserialize<'de> for BackoffNoticePayload
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>,
impl Eq for BackoffNoticePayload
Source§impl PartialEq for BackoffNoticePayload
impl PartialEq for BackoffNoticePayload
Source§fn eq(&self, other: &BackoffNoticePayload) -> bool
fn eq(&self, other: &BackoffNoticePayload) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for BackoffNoticePayload
impl Serialize for BackoffNoticePayload
impl StructuralPartialEq for BackoffNoticePayload
Auto Trait Implementations§
impl Freeze for BackoffNoticePayload
impl RefUnwindSafe for BackoffNoticePayload
impl Send for BackoffNoticePayload
impl Sync for BackoffNoticePayload
impl Unpin for BackoffNoticePayload
impl UnsafeUnpin for BackoffNoticePayload
impl UnwindSafe for BackoffNoticePayload
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SlotValue for T
impl<T> SlotValue for T
Source§fn into_any_boxed(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any_boxed(self: Box<T>) -> Box<dyn Any + Sync + Send>
Box<dyn SlotValue> as Box<dyn Any> for
Box::downcast. Required because the SlotValue and
Any vtables are distinct even though SlotValue: Any.Source§fn clone_boxed(&self) -> Box<dyn SlotValue>
fn clone_boxed(&self) -> Box<dyn SlotValue>
Source§fn to_wire_bytes(&self) -> Result<Vec<u8>, SlotValueError>
fn to_wire_bytes(&self) -> Result<Vec<u8>, SlotValueError>
clone_boxed instead.Source§fn type_hash(&self) -> u64
fn type_hash(&self) -> u64
std::any::type_name::<T>(); receiver decodes only on a
matching hash.Source§fn runtime_type(&self) -> &'static TypeNode
fn runtime_type(&self) -> &'static TypeNode
Source§fn charged_bytes(&self) -> usize
fn charged_bytes(&self) -> usize
NodeConfig::ingress_byte_budget. Slot-table eviction calls
this to release the charge. Default 0 — only
ingress-derived carriers register a non-zero resolver via
[register_charged_bytes!].