[−][src]Struct druid_shell::dialog::FileSpec
A description of a filetype, for specifiying allowed types in a file dialog.
Windows
On windows, each instance of this type is converted to a COMDLG_FILTERSPEC
struct.
Fields
name: &'static str
A human readable name, describing this filetype.
This is used in the Windows file dialog, where the user can select from a dropdown the type of file they would like to choose.
This should not include the file extensions; they will be added automatically. For instance, if we are describing Word documents, the name would be "Word Document", and the displayed string would be "Word Document (*.doc)".
extensions: &'static [&'static str]
The file extensions used by this file type.
This should not include the leading '.'.
Methods
impl FileSpec
[src]
pub const TEXT: FileSpec
[src]
pub const JPG: FileSpec
[src]
pub const GIF: FileSpec
[src]
pub const PDF: FileSpec
[src]
pub const HTML: FileSpec
[src]
pub const fn new(
name: &'static str,
extensions: &'static [&'static str]
) -> Self
[src]
name: &'static str,
extensions: &'static [&'static str]
) -> Self
Create a new FileSpec
.
Trait Implementations
Auto Trait Implementations
impl Send for FileSpec
impl Sync for FileSpec
impl Unpin for FileSpec
impl UnwindSafe for FileSpec
impl RefUnwindSafe for FileSpec
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,