Skip to main content

RewardServiceImpl

Struct RewardServiceImpl 

Source
pub struct RewardServiceImpl<S> {
    state: S,
}
Expand description

gRPC reward service implementation wrapping a RewardApi implementation

Fields§

§state: S

Implementations§

Source§

impl<S> RewardServiceImpl<S>

Source

pub fn new(state: S) -> Self

Trait Implementations§

Source§

impl<S> RewardService for RewardServiceImpl<S>
where S: RewardApi + Send + Sync + 'static,

Source§

fn get_reward_claim_input<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardClaimInputRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardClaimInput>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get reward claim input for L1 contract submission (at latest finalized height)
Source§

fn get_reward_balance<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardBalanceRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardBalance>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get reward balance (at latest finalized height)
Source§

fn get_reward_account_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardAccountProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardAccountQueryDataV2>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get Merkle proof for reward account (at latest finalized height)
Source§

fn get_reward_balances<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardBalancesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardBalances>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get paginated list of reward balances at a specific height
Source§

fn get_reward_merkle_tree_v2<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardMerkleTreeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardMerkleTreeV2Data>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get raw RewardMerkleTreeV2 snapshot at a specific height

Auto Trait Implementations§

§

impl<S> Freeze for RewardServiceImpl<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for RewardServiceImpl<S>
where S: RefUnwindSafe,

§

impl<S> Send for RewardServiceImpl<S>
where S: Send,

§

impl<S> Sync for RewardServiceImpl<S>
where S: Sync,

§

impl<S> Unpin for RewardServiceImpl<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for RewardServiceImpl<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for RewardServiceImpl<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoApi for T

§

fn into_api<A>(self) -> UseApi<T, A>

into [UseApi]
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more