pub struct FileAssociation {
pub ext: Vec<AssociationExt>,
pub content_types: Option<Vec<String>>,
pub name: Option<String>,
pub description: Option<String>,
pub role: BundleTypeRole,
pub mime_type: Option<String>,
pub rank: HandlerRank,
pub exported_type: Option<ExportedFileAssociation>,
}Expand description
File association
Fields§
§ext: Vec<AssociationExt>File extensions to associate with this app. e.g. ‘png’
content_types: Option<Vec<String>>Declare support to a file with the given content type. Maps to LSItemContentTypes on macOS.
This allows supporting any file format declared by another application that conforms to this type.
Declaration of new types can be done with Self::exported_type and linking to certain content types are done via ExportedFileAssociation::conforms_to.
name: Option<String>The name. Maps to CFBundleTypeName on macOS. Default to ext[0]
description: Option<String>The association description. Windows-only. It is displayed on the Type column on Windows Explorer.
role: BundleTypeRoleThe app’s role with respect to the type. Maps to CFBundleTypeRole on macOS.
mime_type: Option<String>The mime-type e.g. ‘image/png’ or ‘text/plain’. Linux-only.
rank: HandlerRankThe ranking of this app among apps that declare themselves as editors or viewers of the given file type. Maps to LSHandlerRank on macOS.
exported_type: Option<ExportedFileAssociation>The exported type definition. Maps to a UTExportedTypeDeclarations entry on macOS.
You should define this if the associated file is a custom file type defined by your application.
Trait Implementations§
Source§impl Clone for FileAssociation
impl Clone for FileAssociation
Source§fn clone(&self) -> FileAssociation
fn clone(&self) -> FileAssociation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more