pub struct FeatureMappings {
pub sml: ModuleFeatures,
pub wml: ModuleFeatures,
pub pml: ModuleFeatures,
pub dml: ModuleFeatures,
}Expand description
Complete feature mappings file structure.
Fields§
§sml: ModuleFeaturesSpreadsheetML feature mappings.
wml: ModuleFeaturesWordprocessingML feature mappings.
pml: ModuleFeaturesPresentationML feature mappings.
dml: ModuleFeaturesDrawingML feature mappings.
Implementations§
Source§impl FeatureMappings
impl FeatureMappings
Sourcepub fn from_yaml_file(path: &Path) -> Result<Self, Box<dyn Error>>
pub fn from_yaml_file(path: &Path) -> Result<Self, Box<dyn Error>>
Load mappings from a YAML file.
Sourcepub fn for_module(&self, module: &str) -> &ModuleFeatures
pub fn for_module(&self, module: &str) -> &ModuleFeatures
Get the module features for a given module name.
Get feature tags for a specific element’s attribute/child.
Returns None if no mapping exists (meaning it’s always included).
Supports * wildcard as a fallback for fields not explicitly listed.
Trait Implementations§
Source§impl Clone for FeatureMappings
impl Clone for FeatureMappings
Source§fn clone(&self) -> FeatureMappings
fn clone(&self) -> FeatureMappings
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 FeatureMappings
impl Debug for FeatureMappings
Source§impl Default for FeatureMappings
impl Default for FeatureMappings
Source§fn default() -> FeatureMappings
fn default() -> FeatureMappings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FeatureMappings
impl<'de> Deserialize<'de> for FeatureMappings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FeatureMappings
impl RefUnwindSafe for FeatureMappings
impl Send for FeatureMappings
impl Sync for FeatureMappings
impl Unpin for FeatureMappings
impl UnsafeUnpin for FeatureMappings
impl UnwindSafe for FeatureMappings
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