[−][src]Struct druid::FileSpec
A description of a filetype, for specifiying allowed types in a file dialog.
Windows
Each instance of this type is converted to a COMDLG_FILTERSPEC
struct.
macOS
These file types also apply to directories to define them as packages.
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 '.'.
Implementations
impl FileSpec
[src]
pub const TEXT: FileSpec
[src]
pub const JPG: FileSpec
[src]
pub const GIF: FileSpec
[src]
pub const PNG: FileSpec
[src]
pub const PDF: FileSpec
[src]
pub const HTML: FileSpec
[src]
pub const fn new(
name: &'static str,
extensions: &'static [&'static str]
) -> FileSpec
[src]
name: &'static str,
extensions: &'static [&'static str]
) -> FileSpec
Create a new FileSpec
.
Trait Implementations
impl Clone for FileSpec
[src]
impl Copy for FileSpec
[src]
impl Debug for FileSpec
[src]
impl PartialEq<FileSpec> for FileSpec
[src]
impl StructuralPartialEq for FileSpec
[src]
Auto Trait Implementations
impl RefUnwindSafe for FileSpec
[src]
impl Send for FileSpec
[src]
impl Sync for FileSpec
[src]
impl Unpin for FileSpec
[src]
impl UnwindSafe for FileSpec
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
pub fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,