Enum matrix_sdk::encryption::backups::BackupState
source · 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::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
source§fn eq(&self, other: &BackupState) -> bool
fn eq(&self, other: &BackupState) -> bool
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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