pub struct ManagedWsConfig {Show 20 fields
pub url: String,
pub endpoint: MakerWsEndpoint,
pub reconnect_delay: Duration,
pub max_reconnect_delay: Duration,
pub reconnect_jitter_ratio: f64,
pub max_reconnect_attempts: u64,
pub connect_timeout: Duration,
pub ping_interval: Duration,
pub auth_timeout: Duration,
pub readiness_timeout: Duration,
pub write_timeout: Duration,
pub command_buffer: usize,
pub broadcast_buffer: usize,
pub max_batch_quotes: usize,
pub max_outbound_message_size: usize,
pub ws_read_timeout: Option<Duration>,
pub pong_timeout: Duration,
pub transport: WsTransportConfig,
pub max_pending_awaits: usize,
pub gap_policy: GapPolicy,
/* private fields */
}Fields§
§url: String§endpoint: MakerWsEndpoint§reconnect_delay: Duration§max_reconnect_delay: Duration§reconnect_jitter_ratio: f64Symmetric reconnect jitter ratio in the inclusive range 0.0..=1.0.
max_reconnect_attempts: u64Reconnects after the initial attempt. Zero means retry forever.
connect_timeout: DurationManaged handshake deadline. Overrides transport.connect_timeout for this runtime.
ping_interval: Duration§auth_timeout: Duration§readiness_timeout: DurationDeadline for initial subscription acknowledgement and recovery reads. For live subscription changes, starts after the frame is written.
write_timeout: Duration§command_buffer: usize§broadcast_buffer: usize§max_batch_quotes: usizeMaximum number of quotes accepted in one outbound batch.
max_outbound_message_size: usizeMaximum serialized size of one outbound client message.
ws_read_timeout: Option<Duration>§pong_timeout: Duration§transport: WsTransportConfig§max_pending_awaits: usize§gap_policy: GapPolicyImplementations§
Source§impl ManagedWsConfig
impl ManagedWsConfig
Sourcepub fn new(
url: impl Into<String>,
hello: HelloData,
signer: Arc<dyn SignerLike + Send + Sync>,
auth_pubkey: impl Into<Address32>,
) -> Self
pub fn new( url: impl Into<String>, hello: HelloData, signer: Arc<dyn SignerLike + Send + Sync>, auth_pubkey: impl Into<Address32>, ) -> Self
Authenticate as maker owner auth_pubkey; signer must be its registered
quote-signing key (which may equal the owner key).
Sourcepub const fn low_latency(self) -> Self
pub const fn low_latency(self) -> Self
Short liveness deadlines, a larger command buffer and reconnect on inbound gaps.
pub const fn with_gap_policy(self, policy: GapPolicy) -> Self
pub const fn with_endpoint(self, endpoint: MakerWsEndpoint) -> Self
pub fn with_initial_subscribe(self, subscribe: SubscribeData) -> Self
Sourcepub fn validate(&self) -> Result<(), ManagedWsConfigError>
pub fn validate(&self) -> Result<(), ManagedWsConfigError>
Validate task capacities and deadlines before spawning the session.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ManagedWsConfig
impl !UnwindSafe for ManagedWsConfig
impl Forget for ManagedWsConfig
impl Freeze for ManagedWsConfig
impl Send for ManagedWsConfig
impl Sync for ManagedWsConfig
impl Unpin for ManagedWsConfig
impl UnsafeUnpin for ManagedWsConfig
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
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,
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