pub enum WorkbookFormat {
Xlsx,
Xlsm,
Xltx,
Xltm,
Xlam,
}Expand description
The OOXML package format, determined by the workbook content type in
[Content_Types].xml. Controls which content type string is emitted for
xl/workbook.xml on save.
Variants§
Xlsx
Standard spreadsheet (.xlsx).
Xlsm
Macro-enabled spreadsheet (.xlsm).
Xltx
Template (.xltx).
Xltm
Macro-enabled template (.xltm).
Xlam
Macro-enabled add-in (.xlam).
Implementations§
Source§impl WorkbookFormat
impl WorkbookFormat
Sourcepub fn from_content_type(ct: &str) -> Option<Self>
pub fn from_content_type(ct: &str) -> Option<Self>
Infer the format from a workbook content type string found in
[Content_Types].xml.
Sourcepub fn from_extension(ext: &str) -> Option<Self>
pub fn from_extension(ext: &str) -> Option<Self>
Infer the format from a file extension (case-insensitive, without the
leading dot). Returns None for unrecognized extensions.
Sourcepub fn content_type(self) -> &'static str
pub fn content_type(self) -> &'static str
Return the OOXML content type string for this format.
Trait Implementations§
Source§impl Clone for WorkbookFormat
impl Clone for WorkbookFormat
Source§fn clone(&self) -> WorkbookFormat
fn clone(&self) -> WorkbookFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkbookFormat
impl Debug for WorkbookFormat
Source§impl Default for WorkbookFormat
impl Default for WorkbookFormat
Source§fn default() -> WorkbookFormat
fn default() -> WorkbookFormat
Returns the “default value” for a type. Read more
Source§impl PartialEq for WorkbookFormat
impl PartialEq for WorkbookFormat
impl Copy for WorkbookFormat
impl Eq for WorkbookFormat
impl StructuralPartialEq for WorkbookFormat
Auto Trait Implementations§
impl Freeze for WorkbookFormat
impl RefUnwindSafe for WorkbookFormat
impl Send for WorkbookFormat
impl Sync for WorkbookFormat
impl Unpin for WorkbookFormat
impl UnwindSafe for WorkbookFormat
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.