RemoteProvider

Trait RemoteProvider 

Source
pub trait RemoteProvider {
    // Required methods
    fn get_keyring() -> Entry;
    fn new() -> Self;
    fn pull(&self) -> Result<Vec<Package>, Box<dyn Error>>;
    fn push(&self, backup: &[Package]) -> Result<(), Box<dyn Error>>;
    fn login(&self, relogin: bool) -> Result<(), Box<dyn Error>>;
    fn set_id(&self, id: String) -> Result<(), Box<dyn Error>>;
}

Required Methods§

Source

fn get_keyring() -> Entry

Get the keyring for the provider.

Source

fn new() -> Self

Initializes a new RemoteProvider

Source

fn pull(&self) -> Result<Vec<Package>, Box<dyn Error>>

Pulls a backup from a remote server.

Source

fn push(&self, backup: &[Package]) -> Result<(), Box<dyn Error>>

Pushes a backup to a remote server.

Source

fn login(&self, relogin: bool) -> Result<(), Box<dyn Error>>

Obtain a access token for the remote server.

Source

fn set_id(&self, id: String) -> Result<(), Box<dyn Error>>

Set the id for the backup.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§