Enum matrix_sdk::sliding_sync::Error
source · #[non_exhaustive]pub enum Error {
VersionIsMissing,
BadResponse(String),
RequestGeneratorHasNotBeenInitialized(String),
InvalidRange {
start: u32,
end: u32,
},
UnauthenticatedUser,
InternalChannelIsBroken,
InvalidSlidingSyncIdentifier,
JoinError {
task_description: String,
error: JoinError,
},
}
Available on crate feature
experimental-sliding-sync
only.Expand description
Internal representation of errors in Sliding Sync.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
VersionIsMissing
Sliding sync has been configured with a missing version. See
crate::sliding_sync::Version
.
BadResponse(String)
The response we’ve received from the server can’t be parsed or doesn’t
match up with the current expectations on the client side. A
sync
-restart might be required.
RequestGeneratorHasNotBeenInitialized(String)
A SlidingSyncListRequestGenerator
has been used without having been
initialized. It happens when a response is handled before a request has
been sent. It usually happens when testing.
InvalidRange
Ranges have a start
bound greater than end
.
UnauthenticatedUser
We tried to read the user id of a client but it was missing.
InternalChannelIsBroken
The internal channel of SlidingSync
seems to be broken.
InvalidSlidingSyncIdentifier
The name of the Sliding Sync instance is too long.
JoinError
A task failed to execute to completion.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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