pub enum BackupState {
Unknown,
Creating,
Enabling,
Resuming,
Enabled,
Downloading,
Disabling,
}
Expand description
The possible states of the Client
’s room key backup mechanism.
A local backup instance can be created either by receiving a valid backup
recovery key [1] or by having the Client
create a new backup itself.
The Client
can also delete and disable a currently active backup.
Backups will be enabled automatically if we receive the backup recovery key either from:
- Another device using
m.secret.send
[2], which usually happens after completing interactive verification. - Secret storage[3], which is done by calling the
SecretStore::import_secrets()
method.
Variants§
Unknown
There is no locally active backup and we don’t know whether there backup exists on the server.
The reason we don’t know whether a server-side backup exists is that we
don’t get notified by the server about the creation and deletion of
backups. If we want to know the current state, we need to poll the
server, which is done using the Backups::fetch_exists_on_server()
method.
Creating
A new backup is being created by this Client
. This state will be
entered if you call the Backups::create()
method.
Enabling
An existing backup is being enabled for use by this Client
. We
will enter this state if we have received a backup recovery key.
Resuming
An existing backup will be enabled to be used by this Client
after
the client has been restored. This state happens every time a
Client
is restored after we’d previously enabled a backup.
Enabled
The backup is enabled and room keys are actively being backed up.
Downloading
Room keys are currently being downloaded. This state will only happen
after an Enabling
state. The Client
will attempt to download
all room keys from the backup before transitioning into the
Enabled
state.
Disabling
The backup is being disabled and deleted from the server. This state
will happen when you call the Backups::disable()
method. After it
has been disabled, we’re going to transition into the Unknown
state.
Trait Implementations§
Source§impl Clone for BackupState
impl Clone for BackupState
Source§fn clone(&self) -> BackupState
fn clone(&self) -> BackupState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BackupState
impl Debug for BackupState
Source§impl Default for BackupState
impl Default for BackupState
Source§fn default() -> BackupState
fn default() -> BackupState
Source§impl PartialEq for BackupState
impl PartialEq for BackupState
impl Copy for BackupState
impl Eq for BackupState
impl StructuralPartialEq for BackupState
Auto Trait Implementations§
impl Freeze for BackupState
impl RefUnwindSafe for BackupState
impl Send for BackupState
impl Sync for BackupState
impl Unpin for BackupState
impl UnwindSafe for BackupState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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