pub struct DehydratedDevices { /* private fields */ }
Expand description
Struct collecting methods to create and rehydrate dehydrated devices.
Implementations§
source§impl DehydratedDevices
impl DehydratedDevices
sourcepub async fn create(&self) -> Result<DehydratedDevice, DehydrationError>
pub async fn create(&self) -> Result<DehydratedDevice, DehydrationError>
Create a new DehydratedDevice
which can be uploaded to the server.
sourcepub async fn rehydrate(
&self,
pickle_key: &[u8; 32],
device_id: &DeviceId,
device_data: Raw<DehydratedDeviceData>,
) -> Result<RehydratedDevice, DehydrationError>
pub async fn rehydrate( &self, pickle_key: &[u8; 32], device_id: &DeviceId, device_data: Raw<DehydratedDeviceData>, ) -> Result<RehydratedDevice, DehydrationError>
Rehydrate the dehydrated device.
Once rehydrated, to-device events can be pushed into the
RehydratedDevice
to collect the room keys the device has
received.
For more info see the example for the
RehydratedDevice::receive_events()
method.
§Arguments
-
pickle_key
- The encryption key that was used to encrypt the private parts of the identity keys, and one-time keys of the device. -
device_id
- The unique identifier of the device. -
device_data
- The encrypted data of the device, containing the private keys of the device.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DehydratedDevices
impl !RefUnwindSafe for DehydratedDevices
impl Send for DehydratedDevices
impl Sync for DehydratedDevices
impl Unpin for DehydratedDevices
impl !UnwindSafe for DehydratedDevices
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§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>
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