mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-30 12:03:42 +03:00
match process_lib
This commit is contained in:
parent
a2ebe13205
commit
ea51b40d5d
@ -70,7 +70,7 @@ pub enum EthAction {
|
|||||||
pub type EthSubResult = Result<EthSub, EthSubError>;
|
pub type EthSubResult = Result<EthSub, EthSubError>;
|
||||||
|
|
||||||
/// Incoming type for successful subscription updates.
|
/// Incoming type for successful subscription updates.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct EthSub {
|
pub struct EthSub {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
/// can be parsed to [`alloy::rpc::types::eth::pubsub::SubscriptionResult`]
|
/// can be parsed to [`alloy::rpc::types::eth::pubsub::SubscriptionResult`]
|
||||||
@ -78,15 +78,15 @@ pub struct EthSub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// If your subscription is closed unexpectedly, you will receive this.
|
/// If your subscription is closed unexpectedly, you will receive this.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct EthSubError {
|
pub struct EthSubError {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub error: String,
|
pub error: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The Response type which a process will get from requesting with an [`EthAction`] will be
|
/// The Response body type which a process will get from requesting
|
||||||
/// of this type, serialized and deserialized using `serde_json::to_vec`
|
/// with an [`EthAction`] will be of this type, serialized and deserialized
|
||||||
/// and `serde_json::from_slice`.
|
/// using [`serde_json::to_vec`] and [`serde_json::from_slice`].
|
||||||
///
|
///
|
||||||
/// In the case of an [`EthAction::SubscribeLogs`] request, the response will indicate if
|
/// In the case of an [`EthAction::SubscribeLogs`] request, the response will indicate if
|
||||||
/// the subscription was successfully created or not.
|
/// the subscription was successfully created or not.
|
||||||
@ -97,7 +97,7 @@ pub enum EthResponse {
|
|||||||
Err(EthError),
|
Err(EthError),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub enum EthError {
|
pub enum EthError {
|
||||||
/// RPC provider returned an error.
|
/// RPC provider returned an error.
|
||||||
/// Can be parsed to [`alloy::rpc::json_rpc::ErrorPayload`]
|
/// Can be parsed to [`alloy::rpc::json_rpc::ErrorPayload`]
|
||||||
@ -122,7 +122,7 @@ pub enum EthError {
|
|||||||
|
|
||||||
/// The action type used for configuring eth:distro:sys. Only processes which have the "root"
|
/// The action type used for configuring eth:distro:sys. Only processes which have the "root"
|
||||||
/// capability from eth:distro:sys can successfully send this action.
|
/// capability from eth:distro:sys can successfully send this action.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub enum EthConfigAction {
|
pub enum EthConfigAction {
|
||||||
/// Add a new provider to the list of providers.
|
/// Add a new provider to the list of providers.
|
||||||
AddProvider(ProviderConfig),
|
AddProvider(ProviderConfig),
|
||||||
@ -153,7 +153,7 @@ pub enum EthConfigAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Response type from an [`EthConfigAction`] request.
|
/// Response type from an [`EthConfigAction`] request.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub enum EthConfigResponse {
|
pub enum EthConfigResponse {
|
||||||
Ok,
|
Ok,
|
||||||
/// Response from a GetProviders request.
|
/// Response from a GetProviders request.
|
||||||
|
Loading…
Reference in New Issue
Block a user