pub enum OpsDocError {
Malformed {
source: Error,
},
UnknownMajor {
found: String,
},
}Expand description
Why an ops document could not be read.
weave patch apply used to answer both of these with a format! string,
so “this is not JSON”, “this is JSON but not an ops document” and “this is
an ops document from a future major” were one type. The first two are a
caller’s typo; the third means “upgrade weave”, and a caller cannot act on
that difference by reading a sentence.
Variants§
Malformed
The bytes did not decode into an ops document: not JSON, a field of the wrong type, a required field missing, an op outside the vocabulary, or a field the schema does not define.
UnknownMajor
A major version this build does not implement.
Trait Implementations§
Source§impl Debug for OpsDocError
impl Debug for OpsDocError
Source§impl Display for OpsDocError
impl Display for OpsDocError
Source§impl Error for OpsDocError
impl Error for OpsDocError
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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for OpsDocError
impl !UnwindSafe for OpsDocError
impl Freeze for OpsDocError
impl Send for OpsDocError
impl Sync for OpsDocError
impl Unpin for OpsDocError
impl UnsafeUnpin for OpsDocError
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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