pub enum ConversionError {
Show 15 variants
Missing {
item: &'static str,
type: &'static str,
},
Unspecified(&'static str),
Deprecated(&'static str),
InvalidLength {
item: &'static str,
expected: usize,
got: usize,
},
InvalidValue {
item: &'static str,
expected: &'static str,
got: String,
},
Decode(DecodeError),
Encode(EncodeError),
UnknownEnumValue(UnknownEnumValue),
EdSignature(Error),
InvalidPublicKey {
description: &'static str,
value: Option<String>,
},
InvalidVersion,
OpenMls(Error),
Protocol(ProtocolMessageError),
Builder(UninitializedFieldError),
Slice(TryFromSliceError),
}Expand description
General Error types for use when converting/deserializing From/To Protos Loosely Modeled after serdes error type. This general error type avoid circular hard-dependencies on crates further up the tree (xmtp_id/xmtp_mls) if they had defined the error themselves.
Variants§
Missing
Missing field.
Required field missing during proto conversion. Not retryable.
Fields
Unspecified(&'static str)
Unspecified field.
Protobuf field is unspecified. Not retryable.
Deprecated(&'static str)
Deprecated field.
A deprecated protobuf field was used. Not retryable.
InvalidLength
Invalid length.
Data has wrong length for conversion. Not retryable.
Fields
InvalidValue
Invalid value.
Data has unexpected value. Not retryable.
Fields
Decode(DecodeError)
Decode error.
Protobuf decoding failed. Not retryable.
Encode(EncodeError)
Encode error.
Protobuf encoding failed. Not retryable.
UnknownEnumValue(UnknownEnumValue)
Unknown enum value.
Protobuf enum has unrecognized value. Not retryable.
EdSignature(Error)
Ed25519 signature error.
Ed25519 signature bytes invalid. Not retryable.
InvalidPublicKey
Invalid public key.
Public key validation failed. Not retryable.
InvalidVersion
Invalid version.
Protocol version not supported. Not retryable.
OpenMls(Error)
OpenMLS error.
OpenMLS library error. Not retryable.
Protocol(ProtocolMessageError)
Protocol message error.
MLS protocol message error. Not retryable.
Builder(UninitializedFieldError)
Builder error.
Builder field not initialized. Not retryable.
Slice(TryFromSliceError)
Slice error.
Byte slice conversion failed. Not retryable.
Trait Implementations§
Source§impl Debug for ConversionError
impl Debug for ConversionError
Source§impl Display for ConversionError
impl Display for ConversionError
Source§impl Error for ConversionError
impl Error for ConversionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl ErrorCode for ConversionError
impl ErrorCode for ConversionError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Source§impl From<ConversionError> for ApiClientError
impl From<ConversionError> for ApiClientError
Source§fn from(source: ConversionError) -> Self
fn from(source: ConversionError) -> Self
Source§impl From<ConversionError> for BodyError
impl From<ConversionError> for BodyError
Source§fn from(source: ConversionError) -> Self
fn from(source: ConversionError) -> Self
Source§impl From<ConversionError> for GroupIdParseError
impl From<ConversionError> for GroupIdParseError
Source§fn from(source: ConversionError) -> Self
fn from(source: ConversionError) -> Self
Source§impl From<DecodeError> for ConversionError
impl From<DecodeError> for ConversionError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<EncodeError> for ConversionError
impl From<EncodeError> for ConversionError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Source§impl From<Error> for ConversionError
impl From<Error> for ConversionError
Source§impl From<Error> for ConversionError
impl From<Error> for ConversionError
Source§impl From<ProtocolMessageError> for ConversionError
impl From<ProtocolMessageError> for ConversionError
Source§impl From<TryFromSliceError> for ConversionError
impl From<TryFromSliceError> for ConversionError
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> Self
Source§impl From<UninitializedFieldError> for ConversionError
impl From<UninitializedFieldError> for ConversionError
Source§impl From<UnknownEnumValue> for ConversionError
impl From<UnknownEnumValue> for ConversionError
Source§fn from(source: UnknownEnumValue) -> Self
fn from(source: UnknownEnumValue) -> Self
Source§impl RetryableError for ConversionError
impl RetryableError for ConversionError
fn is_retryable(&self) -> bool
Auto Trait Implementations§
impl Freeze for ConversionError
impl !RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnsafeUnpin for ConversionError
impl !UnwindSafe for ConversionError
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.