pub struct ChioLinkOracle { /* private fields */ }Implementations§
Source§impl ChioLinkOracle
impl ChioLinkOracle
pub fn new(config: PriceOracleConfig) -> Result<Self, PriceOracleError>
pub fn new_with_backends( config: PriceOracleConfig, primary: Arc<dyn OracleBackend>, fallback: Option<Arc<dyn OracleBackend>>, ) -> Result<Self, PriceOracleError>
pub fn config(&self) -> &PriceOracleConfig
pub async fn operator_config(&self) -> OperatorConfig
pub async fn set_global_pause( &self, paused: bool, reason: Option<String>, ) -> Result<(), PriceOracleError>
pub async fn set_chain_enabled( &self, chain_id: u64, enabled: bool, ) -> Result<(), PriceOracleError>
pub async fn set_pair_override( &self, pair_override: PairRuntimeOverride, ) -> Result<(), PriceOracleError>
pub async fn cached_rate( &self, base: &str, quote: &str, ) -> Result<Option<ExchangeRate>, PriceOracleError>
pub async fn refresh_pair( &self, base: &str, quote: &str, ) -> Result<ExchangeRate, PriceOracleError>
pub async fn runtime_report( &self, ) -> Result<OracleRuntimeReport, PriceOracleError>
Trait Implementations§
Source§impl PriceOracle for ChioLinkOracle
impl PriceOracle for ChioLinkOracle
Auto Trait Implementations§
impl !Freeze for ChioLinkOracle
impl !RefUnwindSafe for ChioLinkOracle
impl !UnwindSafe for ChioLinkOracle
impl Send for ChioLinkOracle
impl Sync for ChioLinkOracle
impl Unpin for ChioLinkOracle
impl UnsafeUnpin for ChioLinkOracle
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