pub enum DtmError {
Show 13 variants
Failure {
message: String,
},
Ongoing {
message: String,
},
Duplicated {
message: String,
},
InvalidInput {
message: String,
},
HttpStatus {
status: u16,
body: String,
},
Http(Box<Error>),
GrpcStatus(Box<Status>),
Json(Error),
Url(ParseError),
ProtoEncode(EncodeError),
ProtoDecode(DecodeError),
Redis(Box<RedisError>),
Other {
message: String,
},
}Variants§
Failure
Ongoing
Duplicated
InvalidInput
HttpStatus
Http(Box<Error>)
GrpcStatus(Box<Status>)
Json(Error)
Url(ParseError)
ProtoEncode(EncodeError)
ProtoDecode(DecodeError)
Redis(Box<RedisError>)
Other
Implementations§
Source§impl DtmError
impl DtmError
pub fn failure(message: impl Into<String>) -> Self
pub fn ongoing(message: impl Into<String>) -> Self
pub fn duplicated(message: impl Into<String>) -> Self
pub fn is_failure(&self) -> bool
pub fn is_ongoing(&self) -> bool
pub fn is_duplicated(&self) -> bool
pub fn from_dtm_result_string(message: &str) -> Option<Self>
Trait Implementations§
Source§impl Error for DtmError
impl Error for DtmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DecodeError> for DtmError
impl From<DecodeError> for DtmError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for DtmError
impl From<EncodeError> for DtmError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for DtmError
impl From<ParseError> for DtmError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<RedisError> for DtmError
Available on crate feature barrier-redis only.
impl From<RedisError> for DtmError
Available on crate feature
barrier-redis only.Source§fn from(value: RedisError) -> Self
fn from(value: RedisError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DtmError
impl !RefUnwindSafe for DtmError
impl Send for DtmError
impl Sync for DtmError
impl Unpin for DtmError
impl !UnwindSafe for DtmError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.