Struct
SelectFileOptions
pub struct SelectFileOptions { /* private fields */ }Expand description
Options for the file picker navigation request.
Example to only allow accessing .bin files in External location:
let options = SelectFileOptions::default()
.with_start_location(Location::External)
.with_allowed_locations(AllowedLocations::specific(&[Location::External]))
.with_allowed_extensions(AllowedExtensions::specific(&["bin"]));Implementations
impl SelectFileOptions
impl SelectFileOptions
pub fn with_dir_selection_mode(self, dir_selection_mode: bool) -> Self
pub fn with_dir_selection_mode(self, dir_selection_mode: bool) -> Self
Enable directory selection mode.
Doesn’t show the files, only directories and allows navigating into them.
This is disabled by default.
Enabling this also enables dirs_allowed.
pub fn with_dirs_allowed(self, allow_directories: bool) -> Self
pub fn with_dirs_allowed(self, allow_directories: bool) -> Self
Allow viewing and navigating directories.
This is enabled by default.
Disabling this has no effect if dir_selection_mode is enabled.
pub fn with_search_allowed(self, allow_search: bool) -> Self
pub fn with_search_allowed(self, allow_search: bool) -> Self
Display the search bar and activates search menu.
pub fn with_multiple_selection_mode(self, multiple_selection_mode: bool) -> Self
pub fn with_multiple_selection_mode(self, multiple_selection_mode: bool) -> Self
Display the search bar and activates search menu.
This is disabled by default.
Enabling this will disable dir_selection_mode.
Sets whether hidden files are allowed to be shown.
pub fn with_start_location(self, start_location: Location) -> Self
pub fn with_allowed_locations(self, locations: AllowedLocations) -> Self
pub fn with_allowed_extensions(self, extensions: AllowedExtensions) -> Self
pub fn search_allowed(&self) -> bool
pub fn dirs_allowed(&self) -> bool
pub fn dir_selection_mode(&self) -> bool
pub fn multiple_selection_mode(&self) -> bool
pub fn start_location(&self) -> Location
pub fn allowed_locations(&self) -> &AllowedLocations
pub fn allowed_extensions(&self) -> &AllowedExtensions
pub fn from_slice(data: &[u8]) -> Option<Self>
pub fn serialize(&self) -> Vec<u8> ⓘ
Trait Implementations
impl Archive for SelectFileOptions
impl Archive for SelectFileOptions
const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read more