pub struct LimitlessClientBuilder { /* private fields */ }Expand description
Builder for LimitlessClient.
§Example
use limitless::prelude::*;
let api = LimitlessClient::builder()
.api_key("lmts_sk_...")
.secret("base64_secret")
.build()
.unwrap();Implementations§
Source§impl LimitlessClientBuilder
impl LimitlessClientBuilder
Sourcepub fn api_key(self, key: impl Into<String>) -> Self
pub fn api_key(self, key: impl Into<String>) -> Self
Set the API key (token ID for scoped HMAC tokens, or legacy API key).
Sourcepub fn secret(self, secret: impl Into<String>) -> Self
pub fn secret(self, secret: impl Into<String>) -> Self
Set the API secret (base64-encoded HMAC secret for scoped tokens).
Sourcepub fn rest_endpoint(self, url: impl Into<String>) -> Self
pub fn rest_endpoint(self, url: impl Into<String>) -> Self
Use a custom REST API endpoint.
Sourcepub fn ws_endpoint(self, url: impl Into<String>) -> Self
pub fn ws_endpoint(self, url: impl Into<String>) -> Self
Use a custom WebSocket endpoint.
Sourcepub fn recv_window(self, ms: u64) -> Self
pub fn recv_window(self, ms: u64) -> Self
Set the receive window for HMAC request validation (milliseconds).
Sourcepub fn retry_config(self, config: RetryConfig) -> Self
pub fn retry_config(self, config: RetryConfig) -> Self
Configure retry behavior.
Sourcepub fn build(self) -> Result<LimitlessClient, LimitlessError>
pub fn build(self) -> Result<LimitlessClient, LimitlessError>
Build the LimitlessClient.
Falls back to LIMITLESS_API_KEY and LIMITLESS_API_SECRET env vars.
Trait Implementations§
Source§impl Default for LimitlessClientBuilder
impl Default for LimitlessClientBuilder
Source§fn default() -> LimitlessClientBuilder
fn default() -> LimitlessClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LimitlessClientBuilder
impl !RefUnwindSafe for LimitlessClientBuilder
impl Send for LimitlessClientBuilder
impl Sync for LimitlessClientBuilder
impl Unpin for LimitlessClientBuilder
impl UnsafeUnpin for LimitlessClientBuilder
impl !UnwindSafe for LimitlessClientBuilder
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