pub struct Lb { /* private fields */ }Implementations§
Source§impl Lb
impl Lb
pub fn init(config: Config) -> LbResult<Self>
pub fn create_account( &self, username: &str, api_url: &str, welcome_doc: bool, ) -> LbResult<Account>
pub fn import_account( &self, key: &str, api_url: Option<&str>, ) -> LbResult<Account>
pub fn export_account_private_key(&self) -> LbResult<String>
pub fn export_account_phrase(&self) -> LbResult<String>
pub fn export_account_qr(&self) -> LbResult<Vec<u8>>
pub fn get_account(&self) -> LbResult<&Account>
pub fn get_config(&self) -> Config
pub fn create_file( &self, name: &str, parent: &Uuid, file_type: FileType, ) -> LbResult<File>
pub fn safe_write( &self, id: Uuid, old_hmac: Option<DocumentHmac>, content: Vec<u8>, ) -> LbResult<DocumentHmac>
pub fn write_document(&self, id: Uuid, content: &[u8]) -> LbResult<()>
pub fn get_root(&self) -> LbResult<File>
pub fn get_children(&self, id: &Uuid) -> LbResult<Vec<File>>
pub fn get_and_get_children_recursively(&self, id: &Uuid) -> LbResult<Vec<File>>
pub fn get_file_by_id(&self, id: Uuid) -> LbResult<File>
pub fn delete_file(&self, id: &Uuid) -> LbResult<()>
pub fn read_document( &self, id: Uuid, user_activity: bool, ) -> LbResult<DecryptedDocument>
pub fn read_document_with_hmac( &self, id: Uuid, user_activity: bool, ) -> LbResult<(Option<DocumentHmac>, DecryptedDocument)>
pub fn list_metadatas(&self) -> LbResult<Vec<File>>
pub fn rename_file(&self, id: &Uuid, new_name: &str) -> LbResult<()>
pub fn move_file(&self, id: &Uuid, new_parent: &Uuid) -> LbResult<()>
pub fn create_link_at_path( &self, path_and_name: &str, target_id: Uuid, ) -> LbResult<File>
pub fn create_at_path(&self, path_and_name: &str) -> LbResult<File>
pub fn get_by_path(&self, path: &str) -> LbResult<File>
pub fn get_path_by_id(&self, id: Uuid) -> LbResult<String>
pub fn list_paths(&self, filter: Option<Filter>) -> LbResult<Vec<String>>
pub fn get_local_changes(&self) -> LbResult<Vec<Uuid>>
pub fn calculate_work(&self) -> LbResult<SyncStatus>
pub fn sync( &self, f: Option<Box<dyn Fn(SyncProgress) + Send>>, ) -> LbResult<SyncStatus>
pub fn get_last_synced(&self) -> LbResult<i64>
pub fn get_last_synced_human_string(&self) -> LbResult<String>
pub fn get_timestamp_human_string(&self, timestamp: i64) -> String
pub fn suggested_docs(&self, settings: RankingWeights) -> LbResult<Vec<Uuid>>
pub fn clear_suggested(&self) -> LbResult<()>
pub fn clear_suggested_id(&self, target_id: Uuid) -> LbResult<()>
pub fn get_usage(&self) -> LbResult<UsageMetrics>
pub fn get_uncompressed_usage_breakdown(&self) -> LbResult<HashMap<Uuid, usize>>
pub fn get_uncompressed_usage(&self) -> LbResult<UsageItemMetric>
pub fn import_files<F: Fn(ImportStatus)>( &self, sources: &[PathBuf], dest: Uuid, update_status: &F, ) -> LbResult<()>
pub fn export_files( &self, id: Uuid, dest: PathBuf, edit: bool, export_progress: &Option<Box<dyn Fn(ExportFileInfo)>>, ) -> LbResult<()>
pub fn search_file_paths(&self, input: &str) -> LbResult<Vec<SearchResult>>
pub fn search( &self, input: &str, cfg: SearchConfig, ) -> LbResult<Vec<SearchResult>>
pub fn validate(&self) -> LbResult<Vec<Warning>>
pub fn upgrade_account_stripe( &self, account_tier: StripeAccountTier, ) -> LbResult<()>
pub fn upgrade_account_google_play( &self, purchase_token: &str, account_id: &str, ) -> LbResult<()>
pub fn upgrade_account_app_store( &self, original_transaction_id: String, app_account_token: String, ) -> LbResult<()>
pub fn cancel_subscription(&self) -> LbResult<()>
pub fn get_subscription_info(&self) -> LbResult<Option<SubscriptionInfo>>
pub fn delete_account(&self) -> LbResult<()>
pub fn admin_disappear_account(&self, username: &str) -> LbResult<()>
pub fn admin_disappear_file(&self, id: Uuid) -> LbResult<()>
pub fn admin_list_users( &self, filter: Option<AccountFilter>, ) -> LbResult<Vec<Username>>
pub fn admin_get_account_info( &self, identifier: AccountIdentifier, ) -> LbResult<AccountInfo>
pub fn admin_validate_account( &self, username: &str, ) -> LbResult<AdminValidateAccount>
pub fn admin_validate_server(&self) -> LbResult<AdminValidateServer>
pub fn admin_file_info(&self, id: Uuid) -> LbResult<AdminFileInfoResponse>
pub fn admin_rebuild_index(&self, index: ServerIndex) -> LbResult<()>
pub fn admin_set_user_tier( &self, username: &str, info: AdminSetUserTierInfo, ) -> LbResult<()>
pub fn subscribe(&self) -> Receiver<Event>
pub fn status(&self) -> Status
pub fn debug_info(&self, os_info: String) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lb
impl !RefUnwindSafe for Lb
impl Send for Lb
impl Sync for Lb
impl Unpin for Lb
impl !UnwindSafe for Lb
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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