Struct longbridge_httpcli::HttpClientConfig
source · pub struct HttpClientConfig { /* private fields */ }Expand description
Configuration options for Http client
Implementations§
source§impl HttpClientConfig
impl HttpClientConfig
sourcepub fn new(
app_key: impl Into<String>,
app_secret: impl Into<String>,
access_token: impl Into<String>
) -> Self
pub fn new( app_key: impl Into<String>, app_secret: impl Into<String>, access_token: impl Into<String> ) -> Self
Create a new HttpClientConfig
sourcepub fn from_env() -> Result<Self, HttpClientError>
pub fn from_env() -> Result<Self, HttpClientError>
Create a new HttpClientConfig from the given environment variables
Variables
- LONGBRIDGE_APP_KEY
- LONGBRIDGE_APP_SECRET
- LONGBRIDGE_ACCESS_TOKEN
- LONGBRIDGE_HTTP_URL
sourcepub fn http_url(self, url: impl Into<String>) -> Self
pub fn http_url(self, url: impl Into<String>) -> Self
Specifies the url of the OpenAPI server.
Default: https://openapi.longbridgeapp.com NOTE: Usually you don’t need to change it.
Trait Implementations§
source§impl Clone for HttpClientConfig
impl Clone for HttpClientConfig
source§fn clone(&self) -> HttpClientConfig
fn clone(&self) -> HttpClientConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for HttpClientConfig
impl Send for HttpClientConfig
impl Sync for HttpClientConfig
impl Unpin for HttpClientConfig
impl UnwindSafe for HttpClientConfig
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