#[non_exhaustive]pub struct OpenOptions {
pub extensions: Vec<String>,
pub multiple: bool,
pub directories: bool,
}Expand description
What the Open panel allows.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.extensions: Vec<String>File name extensions to allow (e.g. ["csv", "txt"]); empty: any.
multiple: boolAllow choosing several files.
directories: boolChoose folders instead of files.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn extensions(self, extensions: &[&str]) -> Self
pub fn extensions(self, extensions: &[&str]) -> Self
Only files with one of these name extensions (&["csv", "txt"]).
Sourcepub fn directories(self) -> Self
pub fn directories(self) -> Self
Folders instead of files.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§impl Debug for OpenOptions
impl Debug for OpenOptions
Auto Trait Implementations§
impl Forget for OpenOptions
impl Freeze for OpenOptions
impl Move for OpenOptions
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnsafeUnpin for OpenOptions
impl UnwindSafe for OpenOptions
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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