pub struct KrakenDataClientConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> KrakenDataClientConfigBuilder<S>
impl<S: State> KrakenDataClientConfigBuilder<S>
Sourcepub fn build(self) -> KrakenDataClientConfigwhere
S: IsComplete,
pub fn build(self) -> KrakenDataClientConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn api_key(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
pub fn api_key(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
Sourcepub fn maybe_api_key(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
pub fn maybe_api_key(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
Sourcepub fn api_secret(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetApiSecret<S>>where
S::ApiSecret: IsUnset,
pub fn api_secret(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetApiSecret<S>>where
S::ApiSecret: IsUnset,
Sourcepub fn maybe_api_secret(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetApiSecret<S>>where
S::ApiSecret: IsUnset,
pub fn maybe_api_secret(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetApiSecret<S>>where
S::ApiSecret: IsUnset,
Sourcepub fn product_type(
self,
value: KrakenProductType,
) -> KrakenDataClientConfigBuilder<SetProductType<S>>where
S::ProductType: IsUnset,
pub fn product_type(
self,
value: KrakenProductType,
) -> KrakenDataClientConfigBuilder<SetProductType<S>>where
S::ProductType: IsUnset,
Sourcepub fn maybe_product_type(
self,
value: Option<KrakenProductType>,
) -> KrakenDataClientConfigBuilder<SetProductType<S>>where
S::ProductType: IsUnset,
pub fn maybe_product_type(
self,
value: Option<KrakenProductType>,
) -> KrakenDataClientConfigBuilder<SetProductType<S>>where
S::ProductType: IsUnset,
Sourcepub fn environment(
self,
value: KrakenEnvironment,
) -> KrakenDataClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
pub fn environment(
self,
value: KrakenEnvironment,
) -> KrakenDataClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
Sourcepub fn maybe_environment(
self,
value: Option<KrakenEnvironment>,
) -> KrakenDataClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
pub fn maybe_environment(
self,
value: Option<KrakenEnvironment>,
) -> KrakenDataClientConfigBuilder<SetEnvironment<S>>where
S::Environment: IsUnset,
Sourcepub fn base_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
pub fn base_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
Sourcepub fn maybe_base_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
pub fn maybe_base_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
Sourcepub fn ws_public_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetWsPublicUrl<S>>where
S::WsPublicUrl: IsUnset,
pub fn ws_public_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetWsPublicUrl<S>>where
S::WsPublicUrl: IsUnset,
Sourcepub fn maybe_ws_public_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetWsPublicUrl<S>>where
S::WsPublicUrl: IsUnset,
pub fn maybe_ws_public_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetWsPublicUrl<S>>where
S::WsPublicUrl: IsUnset,
Sourcepub fn ws_private_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetWsPrivateUrl<S>>where
S::WsPrivateUrl: IsUnset,
pub fn ws_private_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetWsPrivateUrl<S>>where
S::WsPrivateUrl: IsUnset,
Sourcepub fn maybe_ws_private_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetWsPrivateUrl<S>>where
S::WsPrivateUrl: IsUnset,
pub fn maybe_ws_private_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetWsPrivateUrl<S>>where
S::WsPrivateUrl: IsUnset,
Sourcepub fn ws_l3_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetWsL3Url<S>>where
S::WsL3Url: IsUnset,
pub fn ws_l3_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetWsL3Url<S>>where
S::WsL3Url: IsUnset,
Sourcepub fn maybe_ws_l3_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetWsL3Url<S>>where
S::WsL3Url: IsUnset,
pub fn maybe_ws_l3_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetWsL3Url<S>>where
S::WsL3Url: IsUnset,
Sourcepub fn validate_l3_checksum(
self,
value: bool,
) -> KrakenDataClientConfigBuilder<SetValidateL3Checksum<S>>where
S::ValidateL3Checksum: IsUnset,
pub fn validate_l3_checksum(
self,
value: bool,
) -> KrakenDataClientConfigBuilder<SetValidateL3Checksum<S>>where
S::ValidateL3Checksum: IsUnset,
Sourcepub fn maybe_validate_l3_checksum(
self,
value: Option<bool>,
) -> KrakenDataClientConfigBuilder<SetValidateL3Checksum<S>>where
S::ValidateL3Checksum: IsUnset,
pub fn maybe_validate_l3_checksum(
self,
value: Option<bool>,
) -> KrakenDataClientConfigBuilder<SetValidateL3Checksum<S>>where
S::ValidateL3Checksum: IsUnset,
Sourcepub fn proxy_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
pub fn proxy_url(
self,
value: String,
) -> KrakenDataClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
Sourcepub fn maybe_proxy_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
pub fn maybe_proxy_url(
self,
value: Option<String>,
) -> KrakenDataClientConfigBuilder<SetProxyUrl<S>>where
S::ProxyUrl: IsUnset,
Sourcepub fn timeout_secs(
self,
value: u64,
) -> KrakenDataClientConfigBuilder<SetTimeoutSecs<S>>where
S::TimeoutSecs: IsUnset,
pub fn timeout_secs(
self,
value: u64,
) -> KrakenDataClientConfigBuilder<SetTimeoutSecs<S>>where
S::TimeoutSecs: IsUnset,
Sourcepub fn maybe_timeout_secs(
self,
value: Option<u64>,
) -> KrakenDataClientConfigBuilder<SetTimeoutSecs<S>>where
S::TimeoutSecs: IsUnset,
pub fn maybe_timeout_secs(
self,
value: Option<u64>,
) -> KrakenDataClientConfigBuilder<SetTimeoutSecs<S>>where
S::TimeoutSecs: IsUnset,
Sourcepub fn heartbeat_interval_secs(
self,
value: u64,
) -> KrakenDataClientConfigBuilder<SetHeartbeatIntervalSecs<S>>where
S::HeartbeatIntervalSecs: IsUnset,
pub fn heartbeat_interval_secs(
self,
value: u64,
) -> KrakenDataClientConfigBuilder<SetHeartbeatIntervalSecs<S>>where
S::HeartbeatIntervalSecs: IsUnset,
Sourcepub fn maybe_heartbeat_interval_secs(
self,
value: Option<u64>,
) -> KrakenDataClientConfigBuilder<SetHeartbeatIntervalSecs<S>>where
S::HeartbeatIntervalSecs: IsUnset,
pub fn maybe_heartbeat_interval_secs(
self,
value: Option<u64>,
) -> KrakenDataClientConfigBuilder<SetHeartbeatIntervalSecs<S>>where
S::HeartbeatIntervalSecs: IsUnset,
Sourcepub fn ws_idle_timeout_ms(
self,
value: u64,
) -> KrakenDataClientConfigBuilder<SetWsIdleTimeoutMs<S>>where
S::WsIdleTimeoutMs: IsUnset,
pub fn ws_idle_timeout_ms(
self,
value: u64,
) -> KrakenDataClientConfigBuilder<SetWsIdleTimeoutMs<S>>where
S::WsIdleTimeoutMs: IsUnset,
Optional (Some / Option setters).
Default: 10_000.
Idle timeout (milliseconds) for the spot v2 WebSocket.
If no application data (any text or binary frame) is received within this window, the connection is treated as dead and the client reconnects and resubscribes. This recovers from a backend that acknowledges a subscription but never attaches the data fan-out: the socket stays open with no close frame or transport error, so nothing else detects it.
Kraken sends a heartbeat text frame once per second while at least one
subscription is active, so a live subscribed connection resets this timer
well within the window. Note the client’s keepalive ping is answered
with a pong text frame, which also resets the timer roughly every
heartbeat_interval_secs; the default below is therefore kept short
enough to rely on the 1/s heartbeats rather than the keepalive, which
assumes the connection carries at least one subscription. A connection
held open without any subscription should disable this (0) or raise it
above heartbeat_interval_secs.
0 disables the idle timeout.
Sourcepub fn maybe_ws_idle_timeout_ms(
self,
value: Option<u64>,
) -> KrakenDataClientConfigBuilder<SetWsIdleTimeoutMs<S>>where
S::WsIdleTimeoutMs: IsUnset,
pub fn maybe_ws_idle_timeout_ms(
self,
value: Option<u64>,
) -> KrakenDataClientConfigBuilder<SetWsIdleTimeoutMs<S>>where
S::WsIdleTimeoutMs: IsUnset,
Optional (Some / Option setters).
Default: 10_000.
Idle timeout (milliseconds) for the spot v2 WebSocket.
If no application data (any text or binary frame) is received within this window, the connection is treated as dead and the client reconnects and resubscribes. This recovers from a backend that acknowledges a subscription but never attaches the data fan-out: the socket stays open with no close frame or transport error, so nothing else detects it.
Kraken sends a heartbeat text frame once per second while at least one
subscription is active, so a live subscribed connection resets this timer
well within the window. Note the client’s keepalive ping is answered
with a pong text frame, which also resets the timer roughly every
heartbeat_interval_secs; the default below is therefore kept short
enough to rely on the 1/s heartbeats rather than the keepalive, which
assumes the connection carries at least one subscription. A connection
held open without any subscription should disable this (0) or raise it
above heartbeat_interval_secs.
0 disables the idle timeout.
Sourcepub fn max_requests_per_second(
self,
value: u32,
) -> KrakenDataClientConfigBuilder<SetMaxRequestsPerSecond<S>>where
S::MaxRequestsPerSecond: IsUnset,
pub fn max_requests_per_second(
self,
value: u32,
) -> KrakenDataClientConfigBuilder<SetMaxRequestsPerSecond<S>>where
S::MaxRequestsPerSecond: IsUnset,
Sourcepub fn maybe_max_requests_per_second(
self,
value: Option<u32>,
) -> KrakenDataClientConfigBuilder<SetMaxRequestsPerSecond<S>>where
S::MaxRequestsPerSecond: IsUnset,
pub fn maybe_max_requests_per_second(
self,
value: Option<u32>,
) -> KrakenDataClientConfigBuilder<SetMaxRequestsPerSecond<S>>where
S::MaxRequestsPerSecond: IsUnset,
Sourcepub fn transport_backend(
self,
value: TransportBackend,
) -> KrakenDataClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
pub fn transport_backend(
self,
value: TransportBackend,
) -> KrakenDataClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
Sourcepub fn maybe_transport_backend(
self,
value: Option<TransportBackend>,
) -> KrakenDataClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
pub fn maybe_transport_backend(
self,
value: Option<TransportBackend>,
) -> KrakenDataClientConfigBuilder<SetTransportBackend<S>>where
S::TransportBackend: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for KrakenDataClientConfigBuilder<S>
impl<S> RefUnwindSafe for KrakenDataClientConfigBuilder<S>
impl<S> Send for KrakenDataClientConfigBuilder<S>
impl<S> Sync for KrakenDataClientConfigBuilder<S>
impl<S> Unpin for KrakenDataClientConfigBuilder<S>
impl<S> UnsafeUnpin for KrakenDataClientConfigBuilder<S>
impl<S> UnwindSafe for KrakenDataClientConfigBuilder<S>
Blanket Implementations§
impl<T> Allocation for T
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
§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