pub trait ExchangeAuthentication:
Send
+ Sync
+ Debug {
// Required methods
fn generate_authentication_headers(
&self,
method: &str,
path: &str,
parameters: Option<(&str, &str)>,
) -> Result<FxHashMap<SmartString, SmartString>>;
fn generate_websocket_authentication(&self) -> Result<SmartString>;
fn api_key(&self) -> &str;
// Provided method
fn generate_authentication_headers_with_body(
&self,
method: &str,
path: &str,
parameters: Option<(&str, &str)>,
_body: Option<&str>,
) -> Result<FxHashMap<SmartString, SmartString>> { ... }
}Expand description
Common trait for exchange authentication
Required Methods§
Sourcefn generate_authentication_headers(
&self,
method: &str,
path: &str,
parameters: Option<(&str, &str)>,
) -> Result<FxHashMap<SmartString, SmartString>>
fn generate_authentication_headers( &self, method: &str, path: &str, parameters: Option<(&str, &str)>, ) -> Result<FxHashMap<SmartString, SmartString>>
Generate authentication headers for a request
Sourcefn generate_websocket_authentication(&self) -> Result<SmartString>
fn generate_websocket_authentication(&self) -> Result<SmartString>
Generate WebSocket authentication message
Provided Methods§
Sourcefn generate_authentication_headers_with_body(
&self,
method: &str,
path: &str,
parameters: Option<(&str, &str)>,
_body: Option<&str>,
) -> Result<FxHashMap<SmartString, SmartString>>
fn generate_authentication_headers_with_body( &self, method: &str, path: &str, parameters: Option<(&str, &str)>, _body: Option<&str>, ) -> Result<FxHashMap<SmartString, SmartString>>
Generate authentication headers for a request with body Default implementation calls generate_authentication_headers without body