Skip to main content

ClientHost

Trait ClientHost 

Source
pub trait ClientHost: Send + Sync {
    // Required methods
    fn ensure_sync_allowed(&self) -> Result<()>;
    fn protected_storage(&self) -> StoreResult<Arc<dyn ProtectedStorage>>;
    fn blob_dir(&self, database: &Database) -> Result<PathBuf>;
    fn attachment_lifecycle_policy(&self) -> LifecyclePolicy;
    fn device_label(&self) -> Option<String>;
}

Required Methods§

Source

fn ensure_sync_allowed(&self) -> Result<()>

Refuses sync while the host’s policy disables it.

Source

fn protected_storage(&self) -> StoreResult<Arc<dyn ProtectedStorage>>

Storage for protected keys. Called only when an operation opens the key store, so databases that don’t take part in sync never need it.

Source

fn blob_dir(&self, database: &Database) -> Result<PathBuf>

The local image blob root of database.

Source

fn attachment_lifecycle_policy(&self) -> LifecyclePolicy

Lifecycle limits for images installed from encrypted sync.

Source

fn device_label(&self) -> Option<String>

A name other devices show for this one, such as the computer name. Asked for only while this device has no published label; control characters are dropped and the length is bounded.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§