Enum rs_consul::ConsulError
source · [−]pub enum ConsulError {
Show 15 variants
InvalidRequest(Error),
RequestError(Error),
ResponseError(Error),
InvalidResponse(Error),
ResponseDeserializationFailed(Error),
ResponseStringDeserializationFailed(Utf8Error),
UnexpectedResponseCode(StatusCode, String),
LockAcquisitionFailure(u64),
InvalidUtf8(Utf8Error),
InvalidBase64(DecodeError),
SyncIoError(Error),
SyncInvalidResponseError(ParseBoolError),
SyncUnexpectedResponseCode(u16, String),
TimeoutExceeded(Duration),
ServiceInstanceResolutionFailed(String),
}
Expand description
The error type returned from all calls into this this crate.
Variants
InvalidRequest(Error)
The request was invalid and could not be serialized to valid json.
RequestError(Error)
The request was invalid and could not be converted into a proper http request.
ResponseError(Error)
The consul server response could not be converted into a proper http response.
InvalidResponse(Error)
The consul server response was invalid.
ResponseDeserializationFailed(Error)
The consul server response could not be deserialized from json.
ResponseStringDeserializationFailed(Utf8Error)
The consul server response could not be deserialized from bytes.
UnexpectedResponseCode(StatusCode, String)
The consul server response was something other than 200. The status code and the body of the response are included.
LockAcquisitionFailure(u64)
The consul server refused a lock acquisition (usually because some other session has a lock).
InvalidUtf8(Utf8Error)
Consul returned invalid UTF8.
InvalidBase64(DecodeError)
Consul returned invalid base64.
SyncIoError(Error)
IO error from sync api.
SyncInvalidResponseError(ParseBoolError)
Response parse error from sync api.
SyncUnexpectedResponseCode(u16, String)
Unexpected response code from sync api.
TimeoutExceeded(Duration)
Consul request exceeded specified timeout.
ServiceInstanceResolutionFailed(String)
Unable to resolve the service’s instances in Consul.
Trait Implementations
sourceimpl Debug for ConsulError
impl Debug for ConsulError
sourceimpl Display for ConsulError
impl Display for ConsulError
sourceimpl Error for ConsulError
impl Error for ConsulError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<DecodeError> for ConsulError
impl From<DecodeError> for ConsulError
sourcefn from(err: DecodeError) -> ConsulError
fn from(err: DecodeError) -> ConsulError
Converts to this type from the input type.
sourceimpl From<Error> for ConsulError
impl From<Error> for ConsulError
sourcefn from(err: Error) -> ConsulError
fn from(err: Error) -> ConsulError
Converts to this type from the input type.
sourceimpl From<ParseBoolError> for ConsulError
impl From<ParseBoolError> for ConsulError
sourcefn from(err: ParseBoolError) -> ConsulError
fn from(err: ParseBoolError) -> ConsulError
Converts to this type from the input type.
sourceimpl From<Utf8Error> for ConsulError
impl From<Utf8Error> for ConsulError
sourcefn from(err: Utf8Error) -> ConsulError
fn from(err: Utf8Error) -> ConsulError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ConsulError
impl Send for ConsulError
impl Sync for ConsulError
impl Unpin for ConsulError
impl !UnwindSafe for ConsulError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more