pub struct ClientConfig {Show 14 fields
pub url: String,
pub bearer_token: Option<String>,
pub max_num_retries: u32,
pub retry_backoff_ms: u64,
pub retry_base_ms: u64,
pub retry_ceiling_ms: u64,
pub req_timeout_millis: u64,
pub compute_units_per_second: Option<u64>,
pub batch_size: Option<usize>,
pub trace_method: Option<TraceMethod>,
pub stop_on_head: bool,
pub head_poll_interval_millis: u64,
pub buffer_size: usize,
pub reorg_safe_distance: u64,
}Expand description
All configuration for the RPC client, including both connection settings and stream behaviour.
Fields§
§url: StringJSON-RPC endpoint URL.
bearer_token: Option<String>Optional bearer token for authenticated providers.
max_num_retries: u32Maximum number of retries for a single RPC call.
retry_backoff_ms: u64Fixed per-retry delay in milliseconds used by alloy’s RetryBackoffLayer.
retry_base_ms: u64Base delay for exponential backoff (used by per-block retry loops, not by alloy).
retry_ceiling_ms: u64Maximum delay for exponential backoff (used by per-block retry loops, not by alloy).
req_timeout_millis: u64Per-request HTTP timeout in milliseconds.
compute_units_per_second: Option<u64>Compute-unit rate limit for alloy’s RetryBackoffLayer.
batch_size: Option<usize>Initial number of blocks per batch in simple pipeline mode; Response size (in blocks) in multi-pipeline mode (impact memory usage).
trace_method: Option<TraceMethod>Override the trace method for all trace requests.
stop_on_head: boolWhen true, stop the stream after reaching the chain head instead of
entering live-polling mode.
head_poll_interval_millis: u64How often to poll for new blocks during live mode, in milliseconds.
buffer_size: usizeBounded channel capacity for the ArrowResponse stream.
reorg_safe_distance: u64Number of blocks behind the head to stay, to avoid reorged data.
Implementations§
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 more