pub struct TrafficControlParameters {
pub max_base_traffic_amount: u64,
pub max_base_traffic_accumulation_duration: Option<Duration>,
pub read_vs_write_scaling_factor: u32,
pub set_balance_request_submission_window_size: Option<Duration>,
pub enforce_rate_limiting: bool,
pub base_event_cost: Option<u64>,
pub free_confirmation_responses: bool,
}Fields§
§max_base_traffic_amount: u64[doc-entry-start: TrafficControlParameters] In bytes, the maximum amount of base traffic that can be accumulated
max_base_traffic_accumulation_duration: Option<Duration>Maximum duration over which the base rate can be accumulated Consequently, base_traffic_rate = max_base_traffic_amount / max_base_traffic_accumulation_duration
read_vs_write_scaling_factor: u32Read scaling factor to compute the event cost. In parts per 10 000.
set_balance_request_submission_window_size: Option<Duration>Window size used to compute the max sequencing time of a submission request This impacts how quickly a submission is expected to be accepted before a retry should be attempted by the caller Default is 5 minutes
enforce_rate_limiting: boolIf true, submission requests without enough traffic credit will not be delivered
base_event_cost: Option<u64>In bytes, base event cost added to all sequenced events. Optional
free_confirmation_responses: boolWhether to charge for confirmation responses Default: false
[doc-entry-end: TrafficControlParameters]
Implementations§
Source§impl TrafficControlParameters
impl TrafficControlParameters
Sourcepub fn base_event_cost(&self) -> u64
pub fn base_event_cost(&self) -> u64
Returns the value of base_event_cost, or the default value if base_event_cost is unset.
Trait Implementations§
Source§impl Clone for TrafficControlParameters
impl Clone for TrafficControlParameters
Source§fn clone(&self) -> TrafficControlParameters
fn clone(&self) -> TrafficControlParameters
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 TrafficControlParameters
Source§impl Debug for TrafficControlParameters
impl Debug for TrafficControlParameters
Source§impl Default for TrafficControlParameters
impl Default for TrafficControlParameters
Source§fn default() -> TrafficControlParameters
fn default() -> TrafficControlParameters
impl Eq for TrafficControlParameters
Source§impl Hash for TrafficControlParameters
impl Hash for TrafficControlParameters
Source§impl Message for TrafficControlParameters
impl Message for TrafficControlParameters
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for TrafficControlParameters
impl PartialEq for TrafficControlParameters
impl StructuralPartialEq for TrafficControlParameters
Auto Trait Implementations§
impl Freeze for TrafficControlParameters
impl RefUnwindSafe for TrafficControlParameters
impl Send for TrafficControlParameters
impl Sync for TrafficControlParameters
impl Unpin for TrafficControlParameters
impl UnsafeUnpin for TrafficControlParameters
impl UnwindSafe for TrafficControlParameters
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
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
key and return true if they are equal.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::Request