pub enum ShareError {
InvalidBaseUrl {
url: String,
reason: String,
},
Malformed {
code: Option<String>,
detail: String,
},
Unauthorized {
code: Option<String>,
},
Unavailable {
code: Option<String>,
},
UpgradeRequired(Box<UpgradeRequired>),
Unexpected {
status: u16,
code: Option<String>,
},
WrongEcho {
requested: String,
echoed: String,
},
Transport(String),
}Expand description
Why a share-link operation did not complete.
Variants§
InvalidBaseUrl
The configured API root is not a URL operation paths can hang off.
Malformed
The server refused the link record (400 error.share.malformed, 415, 422): sending
the same request again will not help.
Fields
The credential was refused (401/403), or the session could not produce one.
Fields
The server’s stable error.* code, when it answered.
The server could not answer (500 error.share.unavailable); retrying later may work.
UpgradeRequired(Box<UpgradeRequired>)
The server will not take this client’s writes: the protocol gate’s 426, or a window
it advertised that already refuses this build, so the write never left (issue #674).
Unexpected
The server answered with a status this client does not model, such as the transport
backstop’s 413.
Fields
WrongEcho
The server answered 201 for a different link than the one registered.
Fields
Transport(String)
The request did not complete.
Implementations§
Sourcepub fn error_code(&self) -> Option<&str>
pub fn error_code(&self) -> Option<&str>
The stable error.* catalog code a client localizes, when the server sent one.
Trait Implementations§
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§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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