MethodReturn

Trait MethodReturn 

Source
pub trait MethodReturn<C>: Send {
    type R: Serialize + Send + Sync;
    type E: Debug + Send + Sync;

    // Required method
    fn into_return(self) -> Result<Self::R, Self::E>;
}
Expand description

Trait for types that can be returned by RPC method, is commonly serializable type, or a result wrapper for it

Required Associated Types§

Required Methods§

Source

fn into_return(self) -> Result<Self::R, Self::E>

Implementations on Foreign Types§

Source§

impl<R, E> MethodReturn<(R, E)> for Result<R, E>
where R: Serialize + Send + Sync, E: Debug + Send + Sync,

Source§

type R = R

Source§

type E = E

Source§

fn into_return(self) -> Result<Self::R, Self::E>

Implementors§

Source§

impl<R> MethodReturn<()> for R
where R: Serialize + Send + Sync,

Source§

type R = R

Source§

type E = ()