1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Configuration options for initializing a `CoinbaseWorker`.
//!
//! This module provides the [`WorkerOpts`] used to configure a `CoinbaseWorker`.
//! It allows setting the WebSocket URL and the maximum number of subscriptions per connection,
//! which are used by [`Worker`](`crate::worker::Worker`) to interact with the Coinbase WebSocket API.
//!
//! The module provides:
//! - The [`WorkerOpts`] for specifying worker parameters
//! - Serialization and deserialization support for configuration files
//! - Defaults for WebSocket URL and maximum subscriptions per connection
//! - Internal helpers for handling empty or missing configuration values
//!
use ;
use crateDEFAULT_URL;
use crateMAX_SUBSCRIPTION_PER_CONNECTION;
/// Options for configuring the `CoinbaseWorkerBuilder`.
///
/// `CoinbaseWorkerBuilderOpts` provides a way to specify custom settings for creating a
/// `CoinbaseWorker`. This struct allows users to set optional parameters such as the WebSocket URL
/// and the internal channel size, which will be used during the construction of the
/// `CoinbaseWorker`.
///
/// # Examples
///
/// ```rust
/// use bothan_coinbase::worker::opts::WorkerOpts;
/// let opts = WorkerOpts {
/// url: "wss://ws-feed.exchange.coinbase.com".to_string(),
/// max_subscription_per_connection: 100,
/// };
/// ```
/// This function returns the default WebSocket URL for the Coinbase API.
/// This function returns the default maximum number of subscriptions per connection.