pub struct ChainlinkFeedReader { /* private fields */ }Implementations§
Source§impl ChainlinkFeedReader
impl ChainlinkFeedReader
Sourcepub fn new(
networks: Vec<ChainlinkNetworkConfig>,
egress_contract: HttpEgressContract,
) -> Self
pub fn new( networks: Vec<ChainlinkNetworkConfig>, egress_contract: HttpEgressContract, ) -> Self
Construct a ChainlinkFeedReader that enforces the supplied
HttpEgressContract on every RPC endpoint URL before any HTTP
connect through alloy. The contract is required: the typed
egress gate is the only thing standing between substrate
dispatches and unconstrained RPC URLs.
pub fn try_new( networks: Vec<ChainlinkNetworkConfig>, egress_contract: HttpEgressContract, ) -> Result<Self, PriceOracleError>
Sourcepub fn with_contract(
networks: Vec<ChainlinkNetworkConfig>,
egress_contract: HttpEgressContract,
) -> Self
pub fn with_contract( networks: Vec<ChainlinkNetworkConfig>, egress_contract: HttpEgressContract, ) -> Self
Alias for ChainlinkFeedReader::new.
Trait Implementations§
Source§impl Debug for ChainlinkFeedReader
impl Debug for ChainlinkFeedReader
Source§impl OracleBackend for ChainlinkFeedReader
impl OracleBackend for ChainlinkFeedReader
fn kind(&self) -> OracleBackendKind
fn read_rate<'a>(&'a self, pair: &'a PairConfig, now: u64) -> OracleFuture<'a>
Auto Trait Implementations§
impl Freeze for ChainlinkFeedReader
impl RefUnwindSafe for ChainlinkFeedReader
impl Send for ChainlinkFeedReader
impl Sync for ChainlinkFeedReader
impl Unpin for ChainlinkFeedReader
impl UnsafeUnpin for ChainlinkFeedReader
impl UnwindSafe for ChainlinkFeedReader
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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