pub struct PythPullOracle<C> { /* private fields */ }
Expand description
Pyth Pull Oracle.
Implementations§
Trait Implementations§
Source§impl<S, C> PythPullOracleOps<C> for PythPullOracle<C>
impl<S, C> PythPullOracleOps<C> for PythPullOracle<C>
Source§fn with_pyth_prices<'a, S, It, Fut>(
&'a self,
ctx: &'a PythPullOracleContext,
update: &'a PriceUpdate,
consume: impl FnOnce(Prices) -> Fut,
) -> impl Future<Output = Result<WithPythPrices<'a, C>>>where
C: Deref<Target = S> + Clone + 'a,
S: Signer,
It: IntoIterator<Item = TransactionBuilder<'a, C>>,
Fut: Future<Output = Result<It>>,
fn with_pyth_prices<'a, S, It, Fut>(
&'a self,
ctx: &'a PythPullOracleContext,
update: &'a PriceUpdate,
consume: impl FnOnce(Prices) -> Fut,
) -> impl Future<Output = Result<WithPythPrices<'a, C>>>where
C: Deref<Target = S> + Clone + 'a,
S: Signer,
It: IntoIterator<Item = TransactionBuilder<'a, C>>,
Fut: Future<Output = Result<It>>,
Create transactions to post price updates and consume the prices.
Source§fn with_pyth_price_updates<'a, S, It, Fut>(
&'a self,
ctx: &'a PythPullOracleContext,
updates: impl IntoIterator<Item = &'a BinaryPriceUpdate>,
consume: impl FnOnce(Prices) -> Fut,
) -> impl Future<Output = Result<WithPythPrices<'a, C>>>where
C: Deref<Target = S> + Clone + 'a,
S: Signer,
It: IntoIterator<Item = TransactionBuilder<'a, C>>,
Fut: Future<Output = Result<It>>,
fn with_pyth_price_updates<'a, S, It, Fut>(
&'a self,
ctx: &'a PythPullOracleContext,
updates: impl IntoIterator<Item = &'a BinaryPriceUpdate>,
consume: impl FnOnce(Prices) -> Fut,
) -> impl Future<Output = Result<WithPythPrices<'a, C>>>where
C: Deref<Target = S> + Clone + 'a,
S: Signer,
It: IntoIterator<Item = TransactionBuilder<'a, C>>,
Fut: Future<Output = Result<It>>,
Create transactions to post price updates and consume the prices.
Source§fn execute_with_pyth_price_updates<'a, 'exec, T, S>(
&'exec self,
updates: impl IntoIterator<Item = &'a BinaryPriceUpdate>,
execute: &mut T,
compute_unit_price_micro_lamports: Option<u64>,
skip_preflight: bool,
enable_tracing: bool,
) -> impl Future<Output = Result<()>>
fn execute_with_pyth_price_updates<'a, 'exec, T, S>( &'exec self, updates: impl IntoIterator<Item = &'a BinaryPriceUpdate>, execute: &mut T, compute_unit_price_micro_lamports: Option<u64>, skip_preflight: bool, enable_tracing: bool, ) -> impl Future<Output = Result<()>>
Execute with pyth price updates.
Auto Trait Implementations§
impl<C> Freeze for PythPullOracle<C>where
C: Freeze,
impl<C> RefUnwindSafe for PythPullOracle<C>where
C: RefUnwindSafe,
impl<C> Send for PythPullOracle<C>where
C: Send,
impl<C> Sync for PythPullOracle<C>where
C: Sync,
impl<C> Unpin for PythPullOracle<C>where
C: Unpin,
impl<C> UnwindSafe for PythPullOracle<C>where
C: UnwindSafe,
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
§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