Struct eth_state_server_lib::grpc_server::StateServer
source · pub struct StateServer<M: Middleware + 'static, UD, F: Foldable<UserData = UD>> {
pub block_subscriber: Arc<BlockSubscriber<M>>,
pub env: Arc<StateFoldEnvironment<M, UD>>,
/* private fields */
}Fields§
§block_subscriber: Arc<BlockSubscriber<M>>§env: Arc<StateFoldEnvironment<M, UD>>Implementations§
source§impl<M: Middleware + 'static, UD, F: Foldable<UserData = UD>> StateServer<M, UD, F>
impl<M: Middleware + 'static, UD, F: Foldable<UserData = UD>> StateServer<M, UD, F>
pub fn new( block_subscriber: Arc<BlockSubscriber<M>>, env: Arc<StateFoldEnvironment<M, UD>> ) -> Self
Trait Implementations§
source§impl<M: Middleware + 'static, UD: Send + Sync + 'static, F> StateFold for StateServer<M, UD, F>where
F::InitialState: DeserializeOwned + 'static,
F: Serialize + Foldable<UserData = UD> + 'static,
impl<M: Middleware + 'static, UD: Send + Sync + 'static, F> StateFold for StateServer<M, UD, F>where F::InitialState: DeserializeOwned + 'static, F: Serialize + Foldable<UserData = UD> + 'static,
§type SubscribeNewBlocksStream = Pin<Box<dyn Stream<Item = Result<BlockStreamResponse, Status>> + Send, Global>>
type SubscribeNewBlocksStream = Pin<Box<dyn Stream<Item = Result<BlockStreamResponse, Status>> + Send, Global>>
Server streaming response type for the SubscribeNewBlocks method.
§type SubscribeNewStatesStream = Pin<Box<dyn Stream<Item = Result<StateStreamResponse, Status>> + Send, Global>>
type SubscribeNewStatesStream = Pin<Box<dyn Stream<Item = Result<StateStreamResponse, Status>> + Send, Global>>
Server streaming response type for the SubscribeNewStates method.
fn query_block<'life0, 'async_trait>( &'life0 self, request: Request<QueryBlockRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GrpcBlock>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn query_blocks_since<'life0, 'async_trait>( &'life0 self, request: Request<QueryBlocksSinceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<BlocksSinceResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn subscribe_new_blocks<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeNewBlocksRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeNewBlocksStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn query_state<'life0, 'async_trait>( &'life0 self, request: Request<QueryStateRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GrpcBlockState>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn query_states_since<'life0, 'async_trait>( &'life0 self, request: Request<QueryStatesSinceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<StatesSinceResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn subscribe_new_states<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeNewStatesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeNewStatesStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Auto Trait Implementations§
impl<M, UD, F> !RefUnwindSafe for StateServer<M, UD, F>
impl<M, UD, F> Send for StateServer<M, UD, F>where UD: Send + Sync,
impl<M, UD, F> Sync for StateServer<M, UD, F>where UD: Send + Sync,
impl<M, UD, F> Unpin for StateServer<M, UD, F>where F: Unpin,
impl<M, UD, F> !UnwindSafe for StateServer<M, UD, F>
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request