risingwave_error::tonic

Trait ToTonicStatus

source
pub trait ToTonicStatus
where Self: 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: ?Sized + Error,