pub struct EncryptionSyncService { /* private fields */ }Expand description
High-level helper for synchronizing encryption events using sliding sync.
See the module’s documentation for more details.
Implementations§
Source§impl EncryptionSyncService
impl EncryptionSyncService
Sourcepub async fn new(
client: Client,
poll_and_network_timeouts: Option<(Duration, Duration)>,
) -> Result<Self, Error>
pub async fn new( client: Client, poll_and_network_timeouts: Option<(Duration, Duration)>, ) -> Result<Self, Error>
Creates a new instance of a EncryptionSyncService.
This will create and manage an instance of matrix_sdk::SlidingSync.
Sourcepub fn run_iterations(
self,
permit: OwnedMutexGuard<EncryptionSyncPermit>,
) -> impl Stream<Item = Result<(), Error>>
pub fn run_iterations( self, permit: OwnedMutexGuard<EncryptionSyncPermit>, ) -> impl Stream<Item = Result<(), Error>>
Runs an EncryptionSyncService loop, yielding Ok(()) after each
iteration so the caller can decide whether to continue or stop by
dropping the stream.
Ends without yielding if the cross-process lock is configured but can’t be acquired (another process is expected to run the sync).
Note: the EncryptionSyncPermit parameter ensures that there’s at
most one encryption sync running at any time. See its documentation
for more details.
Auto Trait Implementations§
impl !RefUnwindSafe for EncryptionSyncService
impl !UnwindSafe for EncryptionSyncService
impl Freeze for EncryptionSyncService
impl Send for EncryptionSyncService
impl Sync for EncryptionSyncService
impl Unpin for EncryptionSyncService
impl UnsafeUnpin for EncryptionSyncService
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
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> ⓘ
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