Enum mz_proto::TryFromProtoError
source · pub enum TryFromProtoError {
Show 17 variants
TryFromIntError(TryFromIntError),
CharTryFromError(CharTryFromError),
DateConversionError(String),
RegexError(Error),
RowConversionError(String),
DeserializationError(Error),
MissingField(String),
UnknownEnumVariant(String),
InvalidShardId(String),
CodecMismatch(String),
InvalidPersistState(String),
InvalidSemverVersion(String),
InvalidUri(InvalidUri),
GlobError(Error),
InvalidUrl(ParseError),
InvalidBitFlags(String),
LikePatternDeserializationError(String),
}
Expand description
An error thrown when trying to convert from a *.proto
-generated type
Proto$T
to $T
.
Variants§
TryFromIntError(TryFromIntError)
A wrapped TryFromIntError
due to failed integer downcast.
CharTryFromError(CharTryFromError)
A wrapped CharTryFromError
due to failed char
conversion.
DateConversionError(String)
A date conversion failed
RegexError(Error)
A regex compilation failed
RowConversionError(String)
A mz_repr::Row conversion failed
DeserializationError(Error)
A JSON deserialization failed. TODO: Remove this when we have complete coverage for source and sink structs.
MissingField(String)
Indicates an Option<U>
field in the Proto$T
that should be set,
but for some reason it is not. In practice this should never occur.
UnknownEnumVariant(String)
Indicates an unknown enum variant in Proto$T
.
InvalidShardId(String)
Indicates that the serialized ShardId value failed to deserialize, according to its custom deserialization logic.
CodecMismatch(String)
Indicates that the serialized persist state declared a codec different than the one declared in the state.
InvalidPersistState(String)
Indicates that the serialized persist state being decoded was internally inconsistent.
InvalidSemverVersion(String)
Failed to parse a semver::Version.
InvalidUri(InvalidUri)
Failed to parse a serialized URI
GlobError(Error)
Failed to read back a serialized Glob
InvalidUrl(ParseError)
Failed to parse a serialized URL
InvalidBitFlags(String)
Failed to parse bitflags.
LikePatternDeserializationError(String)
Failed to deserialize a LIKE/ILIKE pattern.
Implementations§
source§impl TryFromProtoError
impl TryFromProtoError
sourcepub fn missing_field<T: ToString>(s: T) -> TryFromProtoError
pub fn missing_field<T: ToString>(s: T) -> TryFromProtoError
Construct a new TryFromProtoError::MissingField
instance.
sourcepub fn unknown_enum_variant<T: ToString>(s: T) -> TryFromProtoError
pub fn unknown_enum_variant<T: ToString>(s: T) -> TryFromProtoError
Construct a new TryFromProtoError::UnknownEnumVariant
instance.
Trait Implementations§
source§impl Debug for TryFromProtoError
impl Debug for TryFromProtoError
source§impl Display for TryFromProtoError
impl Display for TryFromProtoError
source§impl Error for TryFromProtoError
impl Error for TryFromProtoError
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
source§impl From<CharTryFromError> for TryFromProtoError
impl From<CharTryFromError> for TryFromProtoError
source§fn from(error: CharTryFromError) -> Self
fn from(error: CharTryFromError) -> Self
source§impl From<Error> for TryFromProtoError
impl From<Error> for TryFromProtoError
source§impl From<Error> for TryFromProtoError
impl From<Error> for TryFromProtoError
source§impl From<Error> for TryFromProtoError
impl From<Error> for TryFromProtoError
source§impl From<InvalidUri> for TryFromProtoError
impl From<InvalidUri> for TryFromProtoError
source§fn from(error: InvalidUri) -> Self
fn from(error: InvalidUri) -> Self
source§impl From<ParseError> for TryFromProtoError
impl From<ParseError> for TryFromProtoError
source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
source§impl From<TryFromIntError> for TryFromProtoError
impl From<TryFromIntError> for TryFromProtoError
source§fn from(error: TryFromIntError) -> Self
fn from(error: TryFromIntError) -> Self
source§impl From<TryFromProtoError> for String
impl From<TryFromProtoError> for String
Allow ?
operator on Result<_, TryFromProtoError>
in contexts
where the error type is a String
.
source§fn from(error: TryFromProtoError) -> Self
fn from(error: TryFromProtoError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for TryFromProtoError
impl Send for TryFromProtoError
impl Sync for TryFromProtoError
impl Unpin for TryFromProtoError
impl !UnwindSafe for TryFromProtoError
Blanket Implementations§
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
source§impl<E> ErrorExt for Ewhere
E: Error + ?Sized,
impl<E> ErrorExt for Ewhere E: Error + ?Sized,
source§fn display_with_causes(&self) -> ErrorChainFormatter<&Self>
fn display_with_causes(&self) -> ErrorChainFormatter<&Self>
source§fn to_string_with_causes(&self) -> String
fn to_string_with_causes(&self) -> String
self
to a string String
, along with the chain of source errors or
causes, if there are any. Read moresource§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.