pub struct WebullClientBuilder { /* private fields */ }
Expand description
Builder for creating a WebullClient.
Implementations§
Source§impl WebullClientBuilder
impl WebullClientBuilder
Sourcepub fn with_api_key(self, api_key: impl Into<String>) -> Self
pub fn with_api_key(self, api_key: impl Into<String>) -> Self
Set the API key.
Sourcepub fn with_api_secret(self, api_secret: impl Into<String>) -> Self
pub fn with_api_secret(self, api_secret: impl Into<String>) -> Self
Set the API secret.
Sourcepub fn with_device_id(self, device_id: impl Into<String>) -> Self
pub fn with_device_id(self, device_id: impl Into<String>) -> Self
Set the device ID.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the timeout for API requests.
Sourcepub fn with_custom_url(self, url: impl Into<String>) -> Self
pub fn with_custom_url(self, url: impl Into<String>) -> Self
Set a custom base URL.
Sourcepub fn with_paper_trading(self, paper_trading: bool) -> Self
pub fn with_paper_trading(self, paper_trading: bool) -> Self
Set whether to use paper trading.
Sourcepub fn paper_trading(self) -> Self
pub fn paper_trading(self) -> Self
Enable paper trading.
Sourcepub fn with_token_store(self, store: impl TokenStore + 'static) -> Self
pub fn with_token_store(self, store: impl TokenStore + 'static) -> Self
Set a custom token store.
Sourcepub fn with_credential_store(
self,
store: impl CredentialStore + 'static,
) -> Self
pub fn with_credential_store( self, store: impl CredentialStore + 'static, ) -> Self
Set a custom credential store.
Sourcepub fn build(self) -> WebullResult<WebullClient>
pub fn build(self) -> WebullResult<WebullClient>
Build the WebullClient.
Auto Trait Implementations§
impl Freeze for WebullClientBuilder
impl !RefUnwindSafe for WebullClientBuilder
impl Send for WebullClientBuilder
impl Sync for WebullClientBuilder
impl Unpin for WebullClientBuilder
impl !UnwindSafe for WebullClientBuilder
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