Skip to main content

Module server

Module server 

Source
Available on crate feature server only.
Expand description

Shared modules for the JSON-RPC servers.

Re-exports§

pub use helpers::*;

Modules§

helpers
Helpers.

Structs§

BatchResponseBuilder
Builder for the response to a batch request.
BoundedSubscriptions
This wraps [tokio::sync::Semaphore] and is used to limit the number of subscriptions per connection.
ConnectionId
Connection ID.
DisconnectError
Error that may occur during crate::server::MethodSink::send or crate::server::SubscriptionSink::send.
IsUnsubscribed
Represents a subscription until it is unsubscribed.
MethodResponse
Represents a response to a method call.
Methods
Reference-counted, clone-on-write collection of synchronous and asynchronous methods.
PendingSubscriptionAcceptError
The error returned while accepting a subscription.
PendingSubscriptionSink
Represents a single subscription that is waiting to be accepted or rejected.
RpcModule
Sets of JSON-RPC methods can be organized into “module“s that are in turn registered on the server or, alternatively, merged with other modules to construct a cohesive API. RpcModule wraps an additional context argument that can be used to access data during call execution.
SubscriptionKey
Represent a unique subscription entry based on [SubscriptionId] and ConnectionId.
SubscriptionMessage
Subscription message.
SubscriptionSink
A handle to an active subscription.
SubscriptionState
Helper struct to manage subscriptions.

Enums§

MethodCallback
Callback wrapper that can be either sync or async.
ResponsePayload
Represent the payload of the JSON-RPC response object
SendTimeoutError
Error that may occur during crate::server::MethodSink::send_timeout or crate::server::SubscriptionSink::send_timeout.
SubscriptionCloseResponse
Represents what action that will sent when a subscription callback returns.
SubscriptionMessageInner
A complete subscription message or partial subscription message.
TrySendError
Error that may occur during crate::server::MethodSink::try_send or crate::server::SubscriptionSink::try_send.

Traits§

IntoResponse
Something that can be converted into a JSON-RPC method call response.
IntoSubscriptionCloseResponse
Convert something into a subscription close notification before a subscription is terminated.

Type Aliases§

AsyncMethod
Similar to SyncMethod, but represents an asynchronous handler.
MaxResponseSize
Max response size.
Subscribers
Type-alias for subscribers.
SubscriptionMethod
Method callback for subscriptions.
SubscriptionPermit
Subscription permit.
SyncMethod
A MethodCallback is an RPC endpoint, callable with a standard JSON-RPC request, implemented as a function pointer to a Fn function taking four arguments: the id, params, a channel the function uses to communicate the result (or error) back to jsonrpsee, and the connection ID (useful for the websocket transport).