Type Alias client::rpc::CoreResult

source ·
pub type CoreResult<T> = Result<T, Error>;

Aliased Type§

enum CoreResult<T> {
    Ok(T),
    Err(Error),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value

Trait Implementations§

source§

impl<T: Send + Sync + 'static> Into<Pin<Box<dyn Future<Output = Result<T, Error>> + Send>>> for CoreResult<T>

Sometimes an rpc method is implemented asynchronously, then the rpc trait definition must use BoxFuture for the return type.

This into conversion allow non-async rpc implementation method to return RpcResult straight-forward. The delegate! macro with #[into] attribute will automatically call this method to do the return type conversion.

source§

fn into(x: Self) -> BoxFuture<JsonRpcResult<T>>

source§

impl<T> Into<Result<T, Error>> for CoreResult<T>

source§

fn into(x: Self) -> JsonRpcResult<T>