risingwave_rpc_client::error

Trait ToTonicStatus

source
pub trait ToTonicStatus: Error {
    // Required methods
    fn to_status(&self, _: Code, _: impl Into<Cow<'static, str>>) -> Status;
    fn to_status_unnamed(&self, _: Code) -> Status;
}

Required Methods§

source

fn to_status(&self, _: Code, _: impl Into<Cow<'static, str>>) -> Status

Convert the error to tonic::Status with the given tonic::Code and service name.

The source chain is preserved by pairing with TonicStatusWrapper.

source

fn to_status_unnamed(&self, _: Code) -> Status

Convert the error to tonic::Status with the given tonic::Code without specifying the service name. Prefer to_status if possible.

The source chain is preserved by pairing with TonicStatusWrapper.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> ToTonicStatus for T
where T: Error + ?Sized,