pub enum CauseParseError {
Empty,
BadHashLength {
got: usize,
expected: usize,
},
NonHexChar {
ch: char,
position: usize,
},
UppercaseHex {
ch: char,
position: usize,
},
BadStoreId(StoreIdError),
TooManySeparators {
count: usize,
input: String,
},
}Expand description
Why a cause reference was refused.
Every variant carries what was actually seen. A parser that says only “invalid” forces the operator to reconstruct the input by hand, and the inputs here are 64-character hex strings where the difference between valid and invalid is one character in the middle.
Variants§
Empty
Empty input.
BadHashLength
Hash is not exactly 64 characters.
NonHexChar
Hash contains a character that is not a hex digit.
UppercaseHex
Hash contains uppercase hex. Refused rather than lowercased — see the module docs on why content addressing gets one spelling.
BadStoreId(StoreIdError)
The store half of a qualified reference is not a valid store id.
TooManySeparators
More than one SEPARATOR, so the split point is a guess.
Trait Implementations§
Source§impl Clone for CauseParseError
impl Clone for CauseParseError
Source§fn clone(&self) -> CauseParseError
fn clone(&self) -> CauseParseError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CauseParseError
impl Debug for CauseParseError
Source§impl Display for CauseParseError
impl Display for CauseParseError
impl Eq for CauseParseError
Source§impl Error for CauseParseError
impl Error for CauseParseError
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()
Source§impl From<StoreIdError> for CauseParseError
impl From<StoreIdError> for CauseParseError
Source§fn from(e: StoreIdError) -> Self
fn from(e: StoreIdError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CauseParseError
impl PartialEq for CauseParseError
impl StructuralPartialEq for CauseParseError
Auto Trait Implementations§
impl Freeze for CauseParseError
impl RefUnwindSafe for CauseParseError
impl Send for CauseParseError
impl Sync for CauseParseError
impl Unpin for CauseParseError
impl UnsafeUnpin for CauseParseError
impl UnwindSafe for CauseParseError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> 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