pub struct TransportConfig {
pub shared_endpoints: Vec<String>,
pub read_endpoints: Vec<String>,
pub write_endpoints: Vec<String>,
pub ws_endpoint: Option<String>,
pub request_timeout: Duration,
pub strategy: Strategy,
pub circuit_breaker: CircuitBreakerConfig,
pub read_retry: ReadRetryConfig,
pub write_retry: WriteRetryConfig,
}Expand description
Complete transport configuration.
Fields§
Shared HTTP RPC endpoints — handle any request type and serve as fallback when dedicated read/write endpoints are unhealthy.
read_endpoints: Vec<String>Dedicated read endpoints. Read requests prefer these; falls back to shared endpoints if all read endpoints are unhealthy.
write_endpoints: Vec<String>Dedicated write endpoints. Write requests prefer these; falls back to shared endpoints if all write endpoints are unhealthy.
ws_endpoint: Option<String>Optional WebSocket endpoint URL for subscriptions.
request_timeout: DurationPer-request timeout.
strategy: StrategyEndpoint selection strategy.
circuit_breaker: CircuitBreakerConfigCircuit breaker settings (applied per endpoint).
read_retry: ReadRetryConfigRetry settings for read operations.
write_retry: WriteRetryConfigRetry settings for write operations (pre-mempool rejections only).
Implementations§
Source§impl TransportConfig
impl TransportConfig
Sourcepub fn builder() -> TransportConfigBuilder
pub fn builder() -> TransportConfigBuilder
Create a new builder for TransportConfig.
Trait Implementations§
Source§impl Clone for TransportConfig
impl Clone for TransportConfig
Source§fn clone(&self) -> TransportConfig
fn clone(&self) -> TransportConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TransportConfig
impl RefUnwindSafe for TransportConfig
impl Send for TransportConfig
impl Sync for TransportConfig
impl Unpin for TransportConfig
impl UnsafeUnpin for TransportConfig
impl UnwindSafe for TransportConfig
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
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<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 more