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
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