pub struct ManagedWsConfig {Show 21 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 cancel_on_disconnect: bool,
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§cancel_on_disconnect: boolAsk the server to cancel this session’s open quotes when it disconnects; the session terminates if the server does not enable it. Applies only to the quote endpoint.
gap_policy: GapPolicyImplementations§
Source§impl ManagedWsConfig
impl ManagedWsConfig
Sourcepub fn new(
url: impl Into<String>,
hello: HelloData,
signer: Arc<dyn SignerLike + Send + Sync>,
) -> Self
pub fn new( url: impl Into<String>, hello: HelloData, signer: Arc<dyn SignerLike + Send + Sync>, ) -> Self
Authenticate with a local key. The signer’s own public key is the maker
identity unless Self::with_auth_pubkey names a delegating owner.
Sourcepub const fn low_latency(self) -> Self
pub const fn low_latency(self) -> Self
Short liveness deadlines, larger buffers and reconnect on inbound gaps.
pub const fn with_gap_policy(self, policy: GapPolicy) -> Self
pub const fn with_cancel_on_disconnect(self, enabled: bool) -> Self
Sourcepub fn with_auth_pubkey(self, pubkey: impl Into<String>) -> Self
pub fn with_auth_pubkey(self, pubkey: impl Into<String>) -> Self
Set the maker owner’s identity when using a delegated auth signer. The configured signer still signs the challenge.
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 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
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> ⓘ
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