pub struct BrowserStorageProvider;Expand description
The storage provider of the browser: file and folder pickers of the File
System Access API (or of the native-file-system-adapter polyfill where
the browser has none) and bookmarks kept in IndexedDB.
Every operation first imports the storage bundle of the script side.
Implementations§
Trait Implementations§
Source§impl Default for BrowserStorageProvider
impl Default for BrowserStorageProvider
Source§impl IStorageProvider for BrowserStorageProvider
impl IStorageProvider for BrowserStorageProvider
Source§fn can_open(&self) -> bool
fn can_open(&self) -> bool
Returns
true if it is possible to open a file picker on the
current platform.Source§fn open_file_picker_async(
&self,
options: FilePickerOpenOptions,
) -> LocalBoxFuture<Result<Vec<Rc<dyn IStorageFile>>>>
fn open_file_picker_async( &self, options: FilePickerOpenOptions, ) -> LocalBoxFuture<Result<Vec<Rc<dyn IStorageFile>>>>
Opens a file picker dialog. Read more
Source§fn open_file_picker_with_result_async(
&self,
options: FilePickerOpenOptions,
) -> LocalBoxFuture<Result<OpenFilePickerResult>>
fn open_file_picker_with_result_async( &self, options: FilePickerOpenOptions, ) -> LocalBoxFuture<Result<OpenFilePickerResult>>
Opens a file picker dialog and returns the selected files along with
additional information. Read more
Source§fn can_save(&self) -> bool
fn can_save(&self) -> bool
Returns
true if it is possible to open a save file picker on the
current platform.Source§fn save_file_picker_async(
&self,
options: FilePickerSaveOptions,
) -> LocalBoxFuture<Result<Option<Rc<dyn IStorageFile>>>>
fn save_file_picker_async( &self, options: FilePickerSaveOptions, ) -> LocalBoxFuture<Result<Option<Rc<dyn IStorageFile>>>>
Opens a save file picker dialog. Read more
Source§fn save_file_picker_with_result_async(
&self,
options: FilePickerSaveOptions,
) -> LocalBoxFuture<Result<SaveFilePickerResult>>
fn save_file_picker_with_result_async( &self, options: FilePickerSaveOptions, ) -> LocalBoxFuture<Result<SaveFilePickerResult>>
Opens a save file picker dialog and returns the selected file along
with additional information. Read more
Source§fn can_pick_folder(&self) -> bool
fn can_pick_folder(&self) -> bool
Returns
true if it is possible to open a folder picker on the
current platform.Source§fn open_folder_picker_async(
&self,
options: FolderPickerOpenOptions,
) -> LocalBoxFuture<Result<Vec<Rc<dyn IStorageFolder>>>>
fn open_folder_picker_async( &self, options: FolderPickerOpenOptions, ) -> LocalBoxFuture<Result<Vec<Rc<dyn IStorageFolder>>>>
Opens a folder picker dialog. Read more
Source§fn open_file_bookmark_async(
&self,
bookmark: &str,
) -> LocalBoxFuture<Option<Rc<dyn IStorageBookmarkFile>>>
fn open_file_bookmark_async( &self, bookmark: &str, ) -> LocalBoxFuture<Option<Rc<dyn IStorageBookmarkFile>>>
Opens an
IStorageBookmarkFile from the bookmark ID. Read moreSource§fn open_folder_bookmark_async(
&self,
bookmark: &str,
) -> LocalBoxFuture<Option<Rc<dyn IStorageBookmarkFolder>>>
fn open_folder_bookmark_async( &self, bookmark: &str, ) -> LocalBoxFuture<Option<Rc<dyn IStorageBookmarkFolder>>>
Opens an
IStorageBookmarkFolder from the bookmark ID. Read moreSource§fn try_get_file_from_path_async(
&self,
_file_path: &Uri,
) -> LocalBoxFuture<Option<Rc<dyn IStorageFile>>>
fn try_get_file_from_path_async( &self, _file_path: &Uri, ) -> LocalBoxFuture<Option<Rc<dyn IStorageFile>>>
Attempts to read a file from the file-system by its path. Read more
Source§fn try_get_folder_from_path_async(
&self,
_folder_path: &Uri,
) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
fn try_get_folder_from_path_async( &self, _folder_path: &Uri, ) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
Attempts to read a folder from the file-system by its path. Read more
Source§fn try_get_well_known_folder_async(
&self,
well_known_folder: WellKnownFolder,
) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
fn try_get_well_known_folder_async( &self, well_known_folder: WellKnownFolder, ) -> LocalBoxFuture<Option<Rc<dyn IStorageFolder>>>
Attempts to read a folder from the file-system by its well-known
folder identifier.
Source§fn is_file_system_backed(&self) -> bool
fn is_file_system_backed(&self) -> bool
Whether the provider is the file-system backed one
(C#
provider is BclStorageProvider). Read moreAuto Trait Implementations§
impl Freeze for BrowserStorageProvider
impl RefUnwindSafe for BrowserStorageProvider
impl Send for BrowserStorageProvider
impl Sync for BrowserStorageProvider
impl Unpin for BrowserStorageProvider
impl UnsafeUnpin for BrowserStorageProvider
impl UnwindSafe for BrowserStorageProvider
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more