pub struct SwitchcboardPullOracleFactory { /* private fields */ }
Expand description
Switchboard Pull Oracle Factory.
Implementations§
Source§impl SwitchcboardPullOracleFactory
impl SwitchcboardPullOracleFactory
Sourcepub const ENV_GATEWAY: &str = "SWITCHBOARD_GATEWAY"
pub const ENV_GATEWAY: &str = "SWITCHBOARD_GATEWAY"
Gateway Env.
Sourcepub fn from_gateways(gateways: Vec<Gateway>) -> Result<Self>
pub fn from_gateways(gateways: Vec<Gateway>) -> Result<Self>
Create with gateways.
Sourcepub async fn from_default_queue(client: &RpcClient) -> Result<Self>
pub async fn from_default_queue(client: &RpcClient) -> Result<Self>
Create from default queue.
Sourcepub async fn from_queue(client: &RpcClient, queue: &Pubkey) -> Result<Self>
pub async fn from_queue(client: &RpcClient, queue: &Pubkey) -> Result<Self>
Create from queue.
Sourcepub fn num_gateways(&self) -> usize
pub fn num_gateways(&self) -> usize
Get the total number of the gateways.
Sourcepub fn make_oracle_with_gateway_index<'a, C: Deref<Target = impl Signer> + Clone>(
&'a self,
gmsol: &'a Client<C>,
gateway_index: usize,
) -> Option<SwitchboardPullOracle<'a, C>>
pub fn make_oracle_with_gateway_index<'a, C: Deref<Target = impl Signer> + Clone>( &'a self, gmsol: &'a Client<C>, gateway_index: usize, ) -> Option<SwitchboardPullOracle<'a, C>>
Make an oracle with the gateway index.
Sourcepub fn make_oracle_with_rng<'a, C: Deref<Target = impl Signer> + Clone>(
&'a self,
gmsol: &'a Client<C>,
rng: &mut impl Rng,
) -> SwitchboardPullOracle<'a, C>
pub fn make_oracle_with_rng<'a, C: Deref<Target = impl Signer> + Clone>( &'a self, gmsol: &'a Client<C>, rng: &mut impl Rng, ) -> SwitchboardPullOracle<'a, C>
Make an oracle with the given rng.
Sourcepub fn make_oracle<'a, C: Deref<Target = impl Signer> + Clone>(
&'a self,
gmsol: &'a Client<C>,
) -> SwitchboardPullOracle<'a, C>
pub fn make_oracle<'a, C: Deref<Target = impl Signer> + Clone>( &'a self, gmsol: &'a Client<C>, ) -> SwitchboardPullOracle<'a, C>
Make an oracle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SwitchcboardPullOracleFactory
impl !RefUnwindSafe for SwitchcboardPullOracleFactory
impl Send for SwitchcboardPullOracleFactory
impl Sync for SwitchcboardPullOracleFactory
impl Unpin for SwitchcboardPullOracleFactory
impl !UnwindSafe for SwitchcboardPullOracleFactory
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