/// Converts a result from the business logic into the appropriate tonic status
Converts a result from the business logic into the appropriate tonic status
Converts a result from the business logic into the appropriate tonic status
fn to_status(&self) -> tonic::Status {
        use tonic::Status;
        match self {
            Self::InvalidTicket { .. } | Self::InvalidQuery { .. } => {
                Status::invalid_argument(self.to_string())
            }
            Self::Query { .. }
            | Self::Optimize { .. }
            | Self::QueryStream { .. }
            | Self::Serialization { .. } => Status::internal(self.to_string()),
            Self::NamespaceNotFound { .. } | Self::TableNotFound { .. } => {
                Status::not_found(self.to_string())
            }
        }
    }
fn to_status ( & self ) -> tonic :: Status { use tonic :: Status ; match self { Self :: InvalidTicket { .. } | Self :: InvalidQuery { .. } => { Status :: invalid_argument ( self . to_string ( ) ) } Self :: Query { .. } | Self :: Optimize { .. } | Self :: QueryStream { .. } | Self :: Serialization { .. } => Status :: internal ( self . to_string ( ) ) , Self :: NamespaceNotFound { .. } | Self :: TableNotFound { .. } => { Status :: not_found ( self . to_string ( ) ) } } }
Converts a result from the business logic into the appropriate tonic status
Converts a result from the business logic into the appropriate tonic status
&self