pub struct SyncManager { /* private fields */ }Expand description
High-level sync manager.
Always has a valid EncryptionService — if no encryption key exists, don’t create a SyncManager at all.
Implementations§
Source§impl SyncManager
impl SyncManager
pub fn new( config_provider: ConfigProvider, key_service: KeyService, encryption_service: EncryptionService, db: Arc<dyn SyncDb>, clock: ClockRef, blob_plan: Arc<dyn BlobPlan>, observer: Option<Arc<dyn BlobUploadObserver>>, ) -> Self
pub fn encryption_service(&self) -> &EncryptionService
pub fn cloud_home(&self) -> Option<Arc<dyn CloudHome>>
pub fn sync_loop_handle(&self) -> Option<Arc<SyncLoopHandle>>
Sourcepub async fn start_sync(&self)
pub async fn start_sync(&self)
Initialize cloud home and sync loop from current config. Called at startup (if already configured) and after connecting a provider.
pub fn is_sync_ready(&self) -> bool
pub fn trigger_sync(&self)
pub fn get_user_pubkey(&self) -> Result<Option<String>, String>
pub fn generate_restore_code(&self) -> Result<String, String>
pub async fn get_members(&self) -> Result<Vec<MemberInfo>, String>
pub async fn invite_member( &self, public_key_hex: &str, role: MemberRole, ) -> Result<String, String>
pub async fn remove_member( &self, public_key_hex: &str, ) -> Result<String, String>
Auto Trait Implementations§
impl !Freeze for SyncManager
impl !RefUnwindSafe for SyncManager
impl Send for SyncManager
impl Sync for SyncManager
impl Unpin for SyncManager
impl !UnwindSafe for SyncManager
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> 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 moreCreates a shared type from an unshared type.