Struct databento::historical::ClientBuilder
source · pub struct ClientBuilder<AK> { /* private fields */ }
Available on crate feature
historical
only.Expand description
A type-safe builder for the HistoricalClient
. It will not allow you to
call Self::build()
before setting the required key
field.
Implementations§
source§impl<AK> ClientBuilder<AK>
impl<AK> ClientBuilder<AK>
source§impl ClientBuilder<Unset>
impl ClientBuilder<Unset>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ClientBuilder
.
sourcepub fn key_from_env(self) -> Result<ClientBuilder<ApiKey>>
pub fn key_from_env(self) -> Result<ClientBuilder<ApiKey>>
Sets the API key reading it from the DATABENTO_API_KEY
environment
variable.
§Errors
This function returns an error when the environment variable is not set or the API key is invalid.
Trait Implementations§
source§impl<AK: Clone> Clone for ClientBuilder<AK>
impl<AK: Clone> Clone for ClientBuilder<AK>
source§fn clone(&self) -> ClientBuilder<AK>
fn clone(&self) -> ClientBuilder<AK>
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<AK> Freeze for ClientBuilder<AK>where
AK: Freeze,
impl<AK> RefUnwindSafe for ClientBuilder<AK>where
AK: RefUnwindSafe,
impl<AK> Send for ClientBuilder<AK>where
AK: Send,
impl<AK> Sync for ClientBuilder<AK>where
AK: Sync,
impl<AK> Unpin for ClientBuilder<AK>where
AK: Unpin,
impl<AK> UnwindSafe for ClientBuilder<AK>where
AK: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)