pub enum SessionRecipientCollectionError {
VerifiedUserHasUnsignedDevice(BTreeMap<OwnedUserId, Vec<OwnedDeviceId>>),
VerifiedUserChangedIdentity(Vec<OwnedUserId>),
CrossSigningNotSetup,
SendingFromUnverifiedDevice,
}
Expand description
Error representing a problem when collecting the recipient devices for the room key, during an encryption operation.
Variants§
VerifiedUserHasUnsignedDevice(BTreeMap<OwnedUserId, Vec<OwnedDeviceId>>)
One or more verified users has one or more unsigned devices.
Happens only with CollectStrategy::DeviceBasedStrategy
when
error_on_verified_user_problem
is true.
In order to resolve this, the caller can set the trust level of the
affected devices to LocalTrust::Ignored
or
LocalTrust::BlackListed
(see Device::set_local_trust
), and
then retry the encryption operation.
VerifiedUserChangedIdentity(Vec<OwnedUserId>)
One or more users was previously verified, but they have changed their identity.
Happens only with CollectStrategy::DeviceBasedStrategy
when
error_on_verified_user_problem
is true, or with CollectStrategy::IdentityBasedStrategy
.
In order to resolve this, the user can:
-
re-verify the problematic recipients, or
-
withdraw verification of the problematic recipients with
OtherUserIdentity::withdraw_verification
, or -
set the trust level of all of the devices belonging to the problematic recipients to
LocalTrust::Ignored
orLocalTrust::BlackListed
(seeDevice::set_local_trust
).
The caller can then retry the encryption operation.
CrossSigningNotSetup
Cross-signing has not been configured on our own identity.
Happens only with CollectStrategy::IdentityBasedStrategy
.
(Cross-signing is required for encryption when using
IdentityBasedStrategy
.) Apps should detect this condition and prevent
sending in the UI rather than waiting for this error to be returned when
encrypting.
SendingFromUnverifiedDevice
The current device has not been cross-signed by our own identity.
Happens only with CollectStrategy::IdentityBasedStrategy
.
(Cross-signing is required for encryption when using
IdentityBasedStrategy
.) Apps should detect this condition and prevent
sending in the UI rather than waiting for this error to be returned when
encrypting.
Trait Implementations§
source§impl Error for SessionRecipientCollectionError
impl Error for SessionRecipientCollectionError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for SessionRecipientCollectionError
impl RefUnwindSafe for SessionRecipientCollectionError
impl Send for SessionRecipientCollectionError
impl Sync for SessionRecipientCollectionError
impl Unpin for SessionRecipientCollectionError
impl UnwindSafe for SessionRecipientCollectionError
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, 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