pub struct NotificationClientTimeouts {
pub sync_poll_timeout: Duration,
pub sync_network_timeout: Duration,
pub decryption_deadline: Duration,
pub encryption_sync_poll_timeout: Duration,
pub encryption_sync_network_timeout: Duration,
}Expand description
Timeouts applied by a NotificationClient while fetching the content of
notifications.
Fields§
§sync_poll_timeout: DurationLong-poll timeout of the sliding sync request retrieving the notified events, i.e. how long the homeserver waits for the events to be available before answering.
sync_network_timeout: DurationExtra time allowed for the network round trip of the sliding sync
request retrieving the notified events, on top of
Self::sync_poll_timeout.
decryption_deadline: DurationMaximum time spent waiting for a missing room key, when an event in a notification can’t be decrypted.
This applies to both ways of obtaining the key, so that they give up after the same amount of time:
- When the notification client runs the encryption sync itself, this bounds the time spent running it, once a minimum number of iterations (currently two) have been run. Decryption is attempted after each iteration, so this only bounds the unsuccessful case: once the deadline has passed, no new iteration is started.
- In a
NotificationProcessSetup::SingleProcesssetup where the main encryption sync is already running, the notification client must not run a second one and waits for the running one to receive the key instead. The wait ends as soon as a key for the room is received, so this only bounds the case where the key doesn’t arrive.
In both cases, the event is returned undecrypted once the deadline has passed.
encryption_sync_poll_timeout: DurationLong-poll timeout of each request of the encryption sync run to obtain a missing room key, i.e. how long the homeserver waits for a to-device message to arrive before answering.
Only applies when the notification client runs the encryption sync
itself. Together with Self::decryption_deadline, this determines how
many iterations are run when the homeserver has nothing to return.
encryption_sync_network_timeout: DurationExtra time allowed for the network round trip of each request of the
encryption sync, on top of Self::encryption_sync_poll_timeout. This
is an upper bound on how long a request may take.
Trait Implementations§
Source§impl Clone for NotificationClientTimeouts
impl Clone for NotificationClientTimeouts
Source§fn clone(&self) -> NotificationClientTimeouts
fn clone(&self) -> NotificationClientTimeouts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NotificationClientTimeouts
Source§impl Debug for NotificationClientTimeouts
impl Debug for NotificationClientTimeouts
Source§impl Default for NotificationClientTimeouts
impl Default for NotificationClientTimeouts
impl Eq for NotificationClientTimeouts
impl StructuralPartialEq for NotificationClientTimeouts
Auto Trait Implementations§
impl Freeze for NotificationClientTimeouts
impl RefUnwindSafe for NotificationClientTimeouts
impl Send for NotificationClientTimeouts
impl Sync for NotificationClientTimeouts
impl Unpin for NotificationClientTimeouts
impl UnsafeUnpin for NotificationClientTimeouts
impl UnwindSafe for NotificationClientTimeouts
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
impl<T> AsyncTraitDeps for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
impl<T> CloneAnySend for T
impl<T> CloneAnySendSync for T
impl<T> CloneAnySync for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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