pub struct Client { /* private fields */ }
Expand description
Chainlink Data Streams Client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn try_new(
base: impl IntoUrl,
ws_base: impl IntoUrl,
credential: Credential,
) -> Result<Self>
pub fn try_new( base: impl IntoUrl, ws_base: impl IntoUrl, credential: Credential, ) -> Result<Self>
Create a new Client
with the given base URL.
Sourcepub fn with_credential(credential: Credential) -> Self
pub fn with_credential(credential: Credential) -> Self
Create a new mainnet Client
with the given credential.
Sourcepub fn with_testnet_credential(credential: Credential) -> Self
pub fn with_testnet_credential(credential: Credential) -> Self
Create a new testnet Client
with the given credential.
Sourcepub fn from_defaults() -> Result<Self>
pub fn from_defaults() -> Result<Self>
Create a new Client
with default base url and default ENVs.
Sourcepub fn from_testnet_defaults() -> Result<Self>
pub fn from_testnet_defaults() -> Result<Self>
Create a new Client
with testnest base url and default ENVs.
Sourcepub async fn latest_report(&self, feed_id: &str) -> Result<ApiReport>
pub async fn latest_report(&self, feed_id: &str) -> Result<ApiReport>
Get latest report of the given hex-encoded feed ID.
Sourcepub async fn bulk_report(
&self,
feed_ids: impl IntoIterator<Item = &str>,
ts: OffsetDateTime,
) -> Result<ApiReports>
pub async fn bulk_report( &self, feed_ids: impl IntoIterator<Item = &str>, ts: OffsetDateTime, ) -> Result<ApiReports>
Get bulk of reports with the given feed IDs and timestamp.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§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