Enum crypto_botters::bybit::BybitOption
source · pub enum BybitOption {
Default,
Key(String),
Secret(String),
HttpUrl(BybitHttpUrl),
HttpAuth(BybitHttpAuth),
RecvWindow(i32),
RequestConfig(RequestConfig),
WebSocketUrl(BybitWebSocketUrl),
WebSocketAuth(bool),
WebSocketTopics(Vec<String>),
WebSocketConfig(WebSocketConfig),
}
Available on crate feature
bybit
only.Expand description
Options that can be set when creating handlers
Variants§
Default
Default variant, does nothing
Key(String)
API key
Secret(String)
Api secret
HttpUrl(BybitHttpUrl)
Base url for HTTP requests
HttpAuth(BybitHttpAuth)
Type of authentication used for HTTP requests.
RecvWindow(i32)
receive window parameter used for requests
RequestConfig(RequestConfig)
RequestConfig used when sending requests.
url_prefix
will be overridden by HttpUrl unless HttpUrl
is BybitHttpUrl::None.
WebSocketUrl(BybitWebSocketUrl)
Base url for WebSocket connections
WebSocketAuth(bool)
Whether BybitWebSocketHandler should perform authentication
WebSocketTopics(Vec<String>)
The topics to subscribe to.
WebSocketConfig(WebSocketConfig)
WebSocketConfig used for creating WebSocketConnections
url_prefix
will be overridden by WebSocketUrl unless WebSocketUrl
is BybitWebSocketUrl::None.
By default, ignore_duplicate_during_reconnection
is set to true
.
Trait Implementations§
source§impl Default for BybitOption
impl Default for BybitOption
source§impl HandlerOption for BybitOption
impl HandlerOption for BybitOption
type Options = BybitOptions
source§impl<'a, R, B> HttpOption<'a, R, B> for BybitOptionwhere
R: DeserializeOwned + 'a,
B: Serialize,
impl<'a, R, B> HttpOption<'a, R, B> for BybitOptionwhere
R: DeserializeOwned + 'a,
B: Serialize,
type RequestHandler = BybitRequestHandler<'a, R>
fn request_handler(options: Self::Options) -> Self::RequestHandler
source§impl<H: FnMut(Value) + Send + 'static> WebSocketOption<H> for BybitOption
impl<H: FnMut(Value) + Send + 'static> WebSocketOption<H> for BybitOption
type WebSocketHandler = BybitWebSocketHandler
fn websocket_handler( handler: H, options: Self::Options ) -> Self::WebSocketHandler
Auto Trait Implementations§
impl RefUnwindSafe for BybitOption
impl Send for BybitOption
impl Sync for BybitOption
impl Unpin for BybitOption
impl UnwindSafe for BybitOption
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