pub enum Error {
Show 19 variants
InvalidBaseUrl(String),
InvalidBaseUrlShape(String),
EmptyApplication,
EmptyProfiles,
EmptyResourcePath,
MissingEnvironmentVariable {
name: &'static str,
},
InvalidEnvironmentVariable {
name: &'static str,
reason: &'static str,
value: String,
},
InvalidBootstrapConfiguration(String),
InvalidHeaderName(String),
InvalidHeaderValue {
name: String,
value: String,
},
Transport {
url: String,
source: Error,
},
HttpStatus {
status: StatusCode,
url: String,
body: String,
},
Json {
url: String,
source: Error,
},
Yaml {
url: String,
source: Error,
},
Toml {
url: String,
source: Error,
},
Properties {
origin: String,
reason: String,
},
Utf8 {
url: String,
source: FromUtf8Error,
},
UnsupportedBindingFormat {
format: &'static str,
},
Bind {
origin: String,
source: Error,
},
}Expand description
Error type returned by the Spring Cloud Config client.
Variants§
InvalidBaseUrl(String)
The base URL could not be parsed.
InvalidBaseUrlShape(String)
The base URL contains a query string or fragment, which is not supported.
EmptyApplication
The application name is empty.
EmptyProfiles
No profiles were supplied.
EmptyResourcePath
The resource path is empty.
MissingEnvironmentVariable
A required environment variable is missing.
InvalidEnvironmentVariable
An environment variable has an invalid value.
Fields
InvalidBootstrapConfiguration(String)
The bootstrap configuration is internally inconsistent.
InvalidHeaderName(String)
A custom HTTP header name is invalid.
InvalidHeaderValue
A custom HTTP header value is invalid.
Transport
The HTTP request failed before a valid response was received.
HttpStatus
The Config Server returned a non-success HTTP status.
Fields
status: StatusCodeThe HTTP status code.
Json
The response body could not be parsed as JSON.
Yaml
The response body could not be parsed as YAML.
Toml
The response body could not be parsed as TOML.
Properties
The response body could not be parsed as Java properties.
Utf8
The response body was expected to be UTF-8 text but was not valid UTF-8.
UnsupportedBindingFormat
Typed deserialization is not supported for the requested document kind.
Bind
The configuration payload could not be bound into the requested Rust type.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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<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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.