pub struct DatabentoDataClientFactory;
Expand description
Factory for creating Databento data clients.
Implementations§
Source§impl DatabentoDataClientFactory
impl DatabentoDataClientFactory
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new DatabentoDataClientFactory
instance.
Sourcepub fn create_live_data_client(
client_id: ClientId,
api_key: String,
publishers_filepath: PathBuf,
use_exchange_as_venue: bool,
bars_timestamp_on_close: bool,
clock: &'static AtomicTime,
) -> Result<DatabentoDataClient>
pub fn create_live_data_client( client_id: ClientId, api_key: String, publishers_filepath: PathBuf, use_exchange_as_venue: bool, bars_timestamp_on_close: bool, clock: &'static AtomicTime, ) -> Result<DatabentoDataClient>
Creates a new DatabentoDataClient
instance.
§Errors
Returns an error if the client cannot be created or publisher configuration cannot be loaded.
Sourcepub fn create_live_data_client_with_config(
client_id: ClientId,
config: DatabentoDataClientConfig,
clock: &'static AtomicTime,
) -> Result<DatabentoDataClient>
pub fn create_live_data_client_with_config( client_id: ClientId, config: DatabentoDataClientConfig, clock: &'static AtomicTime, ) -> Result<DatabentoDataClient>
Creates a new DatabentoDataClient
instance with a custom configuration.
§Errors
Returns an error if the client cannot be created.
Trait Implementations§
Source§impl DataClientFactory for DatabentoDataClientFactory
impl DataClientFactory for DatabentoDataClientFactory
Source§fn create(
&self,
name: &str,
config: &dyn ClientConfig,
_cache: Rc<RefCell<Cache>>,
_clock: Rc<RefCell<dyn Clock>>,
) -> Result<Box<dyn DataClient>>
fn create( &self, name: &str, config: &dyn ClientConfig, _cache: Rc<RefCell<Cache>>, _clock: Rc<RefCell<dyn Clock>>, ) -> Result<Box<dyn DataClient>>
Create a new data client instance. Read more
Source§fn config_type(&self) -> &'static str
fn config_type(&self) -> &'static str
Returns the supported configuration type name for this factory.
Source§impl Debug for DatabentoDataClientFactory
impl Debug for DatabentoDataClientFactory
Auto Trait Implementations§
impl Freeze for DatabentoDataClientFactory
impl RefUnwindSafe for DatabentoDataClientFactory
impl Send for DatabentoDataClientFactory
impl Sync for DatabentoDataClientFactory
impl Unpin for DatabentoDataClientFactory
impl UnwindSafe for DatabentoDataClientFactory
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more