pub enum AlbumError {
Transport(String),
Status {
status: u16,
code: Option<String>,
current_version: Option<u64>,
},
Malformed(String),
UpgradeRequired(Box<UpgradeRequired>),
}Expand description
A failure on the album surface: provisioning, or publishing a roster.
Variants§
Transport(String)
The HTTP request failed on the wire, or the session could not authorize it.
Status
The server refused the request.
Fields
current_version: Option<u64>On either roster-version refusal — the 409 error.album.roster_stale that is behind
the server, and the 400 error.album.roster_version_leap that is too far ahead of it
— the version the server holds, which is the one a caller re-signs above. Absent on
every other refusal.
Malformed(String)
The response body was missing a field or otherwise unparsable.
UpgradeRequired(Box<UpgradeRequired>)
The server will not take this client’s writes: its 426, or a window it advertised
that already refuses this build (issue #674). Update the app.
Implementations§
Source§impl AlbumError
impl AlbumError
Sourcepub fn error_code(&self) -> Option<&str>
pub fn error_code(&self) -> Option<&str>
The stable error.* code the server attached to a refusal, when there is one.
Callers switch on this, never on the bare status.
Trait Implementations§
Source§impl Debug for AlbumError
impl Debug for AlbumError
Source§impl Display for AlbumError
impl Display for AlbumError
Source§impl Error for AlbumError
impl Error for AlbumError
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()
Source§impl From<AlbumError> for LifecycleOpError
impl From<AlbumError> for LifecycleOpError
Source§fn from(err: AlbumError) -> Self
fn from(err: AlbumError) -> Self
Source§impl From<AlbumError> for PushError
impl From<AlbumError> for PushError
Source§fn from(source: AlbumError) -> Self
fn from(source: AlbumError) -> Self
Auto Trait Implementations§
impl Freeze for AlbumError
impl RefUnwindSafe for AlbumError
impl Send for AlbumError
impl Sync for AlbumError
impl Unpin for AlbumError
impl UnsafeUnpin for AlbumError
impl UnwindSafe for AlbumError
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