pub enum BackendTarget {
FileSystem(Arc<Paths>),
Database(Arc<Paths>, Client),
}Expand description
Target backend.
Variants§
Implementations§
Source§impl BackendTarget
impl BackendTarget
Sourcepub async fn from_paths<T: AsRef<Paths>>(
paths: T,
) -> Result<BackendTarget, Error>
pub async fn from_paths<T: AsRef<Paths>>( paths: T, ) -> Result<BackendTarget, Error>
Create a backend target from paths.
Sourcepub fn with_account_id(self, account_id: &AccountId) -> Self
pub fn with_account_id(self, account_id: &AccountId) -> Self
Set paths to be for an account identifier.
Sourcepub async fn list_accounts(&self) -> Result<Vec<PublicIdentity>, Error>
pub async fn list_accounts(&self) -> Result<Vec<PublicIdentity>, Error>
List accounts.
Sourcepub async fn list_folders(
&self,
account_id: &AccountId,
) -> Result<Vec<Summary>, Error>
pub async fn list_folders( &self, account_id: &AccountId, ) -> Result<Vec<Summary>, Error>
List user folders for an account.
Sourcepub async fn list_files(&self) -> Result<IndexSet<ExternalFile>, Error>
Available on crate feature files only.
pub async fn list_files(&self) -> Result<IndexSet<ExternalFile>, Error>
files only.List external files for this backend target.
Trait Implementations§
Source§impl Clone for BackendTarget
impl Clone for BackendTarget
Source§fn clone(&self) -> BackendTarget
fn clone(&self) -> BackendTarget
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BackendTarget
impl RefUnwindSafe for BackendTarget
impl Send for BackendTarget
impl Sync for BackendTarget
impl Unpin for BackendTarget
impl UnwindSafe for BackendTarget
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