Struct spreadsheet_ods::WorkBook
source · pub struct WorkBook { /* private fields */ }
Expand description
Book is the main structure for the Spreadsheet.
Implementations§
source§impl WorkBook
impl WorkBook
sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Creates a new, completely empty workbook.
WorkBook::locale_settings can be used to initialize default styles.
sourcepub fn new(locale: Locale) -> Self
pub fn new(locale: Locale) -> Self
Creates a new workbook, and initializes default styles according to the given locale.
If the locale is not supported no ValueFormat’s are set and all depends on the application opening the spreadsheet.
The available locales can be activated via feature-flags.
sourcepub fn locale_settings(&mut self, locale: Locale)
pub fn locale_settings(&mut self, locale: Locale)
Creates a set of default formats and styles for every value-type.
If the locale is not supported no ValueFormat’s are set and all depends on the application opening the spreadsheet.
The available locales can be activated via feature-flags.
sourcepub fn set_version(&mut self, version: String)
pub fn set_version(&mut self, version: String)
ODS version. Defaults to 1.3. It’s not advised to set another value.
sourcepub fn config(&self) -> &WorkBookConfig
pub fn config(&self) -> &WorkBookConfig
Configuration flags.
sourcepub fn config_mut(&mut self) -> &mut WorkBookConfig
pub fn config_mut(&mut self) -> &mut WorkBookConfig
Configuration flags.
sourcepub fn num_sheets(&self) -> usize
pub fn num_sheets(&self) -> usize
Number of sheets.
sourcepub fn sheet_idx<S: AsRef<str>>(&self, name: S) -> Option<usize>
pub fn sheet_idx<S: AsRef<str>>(&self, name: S) -> Option<usize>
Finds the sheet index by the sheet-name.
sourcepub fn detach_sheet(&mut self, n: usize) -> Detached<usize, Sheet>
pub fn detach_sheet(&mut self, n: usize) -> Detached<usize, Sheet>
Detaches a sheet. Useful if you have to make mutating calls to the workbook and the sheet intermixed.
Warning
The sheet has to be re-attached before saving the workbook.
Panics
Panics if the sheet has already been detached. Panics if n is out of bounds.
sourcepub fn attach_sheet(&mut self, sheet: Detached<usize, Sheet>)
pub fn attach_sheet(&mut self, sheet: Detached<usize, Sheet>)
Reattaches the sheet in the place it was before.
Panics
Panics if n is out of bounds.
sourcepub fn sheet(&self, n: usize) -> &Sheet
pub fn sheet(&self, n: usize) -> &Sheet
Returns a certain sheet.
Panics
Panics if n is out of bounds.
sourcepub fn sheet_mut(&mut self, n: usize) -> &mut Sheet
pub fn sheet_mut(&mut self, n: usize) -> &mut Sheet
Returns a certain sheet.
Panics
Panics if n does not exist.
sourcepub fn iter_sheets(&self) -> impl Iterator<Item = &Sheet>
pub fn iter_sheets(&self) -> impl Iterator<Item = &Sheet>
Returns iterator over sheets.
sourcepub fn insert_sheet(&mut self, i: usize, sheet: Sheet)
pub fn insert_sheet(&mut self, i: usize, sheet: Sheet)
Inserts the sheet at the given position.
sourcepub fn push_sheet(&mut self, sheet: Sheet)
pub fn push_sheet(&mut self, sheet: Sheet)
Appends a sheet.
sourcepub fn remove_sheet(&mut self, n: usize) -> Sheet
pub fn remove_sheet(&mut self, n: usize) -> Sheet
Removes a sheet from the table.
Panics
Panics if the sheet was detached.
sourcepub fn add_script(&mut self, v: Script)
pub fn add_script(&mut self, v: Script)
Scripts.
sourcepub fn iter_scripts(&self) -> impl Iterator<Item = &Script>
pub fn iter_scripts(&self) -> impl Iterator<Item = &Script>
Scripts.
sourcepub fn scripts_mut(&mut self) -> &mut Vec<Script>
pub fn scripts_mut(&mut self) -> &mut Vec<Script>
Scripts
sourcepub fn add_event_listener(&mut self, e: EventListener)
pub fn add_event_listener(&mut self, e: EventListener)
Event-Listener
sourcepub fn remove_event_listener(
&mut self,
event_name: &str
) -> Option<EventListener>
pub fn remove_event_listener( &mut self, event_name: &str ) -> Option<EventListener>
Event-Listener
sourcepub fn iter_event_listeners(&self) -> impl Iterator<Item = &EventListener>
pub fn iter_event_listeners(&self) -> impl Iterator<Item = &EventListener>
Event-Listener
sourcepub fn event_listener(&self, event_name: &str) -> Option<&EventListener>
pub fn event_listener(&self, event_name: &str) -> Option<&EventListener>
Event-Listener
sourcepub fn event_listener_mut(
&mut self,
event_name: &str
) -> Option<&mut EventListener>
pub fn event_listener_mut( &mut self, event_name: &str ) -> Option<&mut EventListener>
Event-Listener
sourcepub fn add_def_style(&mut self, value_type: ValueType, style: CellStyleRef)
pub fn add_def_style(&mut self, value_type: ValueType, style: CellStyleRef)
Adds a default-style for all new values. This information is only used when writing the data to the ODS file.
sourcepub fn def_style(&self, value_type: ValueType) -> Option<&CellStyleRef>
pub fn def_style(&self, value_type: ValueType) -> Option<&CellStyleRef>
Returns the default style name.
sourcepub fn add_font(&mut self, font: FontFaceDecl)
pub fn add_font(&mut self, font: FontFaceDecl)
Adds a font.
sourcepub fn remove_font(&mut self, name: &str) -> Option<FontFaceDecl>
pub fn remove_font(&mut self, name: &str) -> Option<FontFaceDecl>
Removes a font.
sourcepub fn iter_fonts(&self) -> impl Iterator<Item = &FontFaceDecl>
pub fn iter_fonts(&self) -> impl Iterator<Item = &FontFaceDecl>
Iterates the fonts.
sourcepub fn font(&self, name: &str) -> Option<&FontFaceDecl>
pub fn font(&self, name: &str) -> Option<&FontFaceDecl>
Returns the FontDecl.
sourcepub fn font_mut(&mut self, name: &str) -> Option<&mut FontFaceDecl>
pub fn font_mut(&mut self, name: &str) -> Option<&mut FontFaceDecl>
Returns a mutable FontDecl.
sourcepub fn add_tablestyle(&mut self, style: TableStyle) -> TableStyleRef
pub fn add_tablestyle(&mut self, style: TableStyle) -> TableStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_tablestyle<S: AsRef<str>>(
&mut self,
name: S
) -> Option<TableStyle>
pub fn remove_tablestyle<S: AsRef<str>>( &mut self, name: S ) -> Option<TableStyle>
Removes a style.
sourcepub fn iter_table_styles(&self) -> impl Iterator<Item = &TableStyle>
pub fn iter_table_styles(&self) -> impl Iterator<Item = &TableStyle>
Iterates the table-styles.
sourcepub fn tablestyle<S: AsRef<str>>(&self, name: S) -> Option<&TableStyle>
pub fn tablestyle<S: AsRef<str>>(&self, name: S) -> Option<&TableStyle>
Returns the style.
sourcepub fn tablestyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut TableStyle>
pub fn tablestyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut TableStyle>
Returns the mutable style.
sourcepub fn add_rowstyle(&mut self, style: RowStyle) -> RowStyleRef
pub fn add_rowstyle(&mut self, style: RowStyle) -> RowStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn rowstyle_mut<S: AsRef<str>>(&mut self, name: S) -> Option<&mut RowStyle>
pub fn rowstyle_mut<S: AsRef<str>>(&mut self, name: S) -> Option<&mut RowStyle>
Returns the mutable style.
sourcepub fn iter_rowstyles(&self) -> impl Iterator<Item = &RowStyle>
pub fn iter_rowstyles(&self) -> impl Iterator<Item = &RowStyle>
Returns iterator over styles.
sourcepub fn add_colstyle(&mut self, style: ColStyle) -> ColStyleRef
pub fn add_colstyle(&mut self, style: ColStyle) -> ColStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn colstyle_mut<S: AsRef<str>>(&mut self, name: S) -> Option<&mut ColStyle>
pub fn colstyle_mut<S: AsRef<str>>(&mut self, name: S) -> Option<&mut ColStyle>
Returns the mutable style.
sourcepub fn iter_colstyles(&self) -> impl Iterator<Item = &ColStyle>
pub fn iter_colstyles(&self) -> impl Iterator<Item = &ColStyle>
Returns iterator over styles.
sourcepub fn add_cellstyle(&mut self, style: CellStyle) -> CellStyleRef
pub fn add_cellstyle(&mut self, style: CellStyle) -> CellStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_cellstyle<S: AsRef<str>>(&mut self, name: S) -> Option<CellStyle>
pub fn remove_cellstyle<S: AsRef<str>>(&mut self, name: S) -> Option<CellStyle>
Removes a style.
sourcepub fn iter_cellstyles(&self) -> impl Iterator<Item = &CellStyle>
pub fn iter_cellstyles(&self) -> impl Iterator<Item = &CellStyle>
Returns iterator over styles.
sourcepub fn cellstyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut CellStyle>
pub fn cellstyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut CellStyle>
Returns the mutable style.
sourcepub fn add_paragraphstyle(&mut self, style: ParagraphStyle) -> ParagraphStyleRef
pub fn add_paragraphstyle(&mut self, style: ParagraphStyle) -> ParagraphStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_paragraphstyle<S: AsRef<str>>(
&mut self,
name: S
) -> Option<ParagraphStyle>
pub fn remove_paragraphstyle<S: AsRef<str>>( &mut self, name: S ) -> Option<ParagraphStyle>
Removes a style.
sourcepub fn iter_paragraphstyles(&self) -> impl Iterator<Item = &ParagraphStyle>
pub fn iter_paragraphstyles(&self) -> impl Iterator<Item = &ParagraphStyle>
Returns iterator over styles.
sourcepub fn paragraphstyle<S: AsRef<str>>(&self, name: S) -> Option<&ParagraphStyle>
pub fn paragraphstyle<S: AsRef<str>>(&self, name: S) -> Option<&ParagraphStyle>
Returns the style.
sourcepub fn paragraphstyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut ParagraphStyle>
pub fn paragraphstyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut ParagraphStyle>
Returns the mutable style.
sourcepub fn add_textstyle(&mut self, style: TextStyle) -> TextStyleRef
pub fn add_textstyle(&mut self, style: TextStyle) -> TextStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_textstyle<S: AsRef<str>>(&mut self, name: S) -> Option<TextStyle>
pub fn remove_textstyle<S: AsRef<str>>(&mut self, name: S) -> Option<TextStyle>
Removes a style.
sourcepub fn iter_textstyles(&self) -> impl Iterator<Item = &TextStyle>
pub fn iter_textstyles(&self) -> impl Iterator<Item = &TextStyle>
Returns iterator over styles.
sourcepub fn textstyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut TextStyle>
pub fn textstyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut TextStyle>
Returns the mutable style.
sourcepub fn add_rubystyle(&mut self, style: RubyStyle) -> RubyStyleRef
pub fn add_rubystyle(&mut self, style: RubyStyle) -> RubyStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_rubystyle<S: AsRef<str>>(&mut self, name: S) -> Option<RubyStyle>
pub fn remove_rubystyle<S: AsRef<str>>(&mut self, name: S) -> Option<RubyStyle>
Removes a style.
sourcepub fn iter_rubystyles(&self) -> impl Iterator<Item = &RubyStyle>
pub fn iter_rubystyles(&self) -> impl Iterator<Item = &RubyStyle>
Returns iterator over styles.
sourcepub fn rubystyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut RubyStyle>
pub fn rubystyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut RubyStyle>
Returns the mutable style.
sourcepub fn add_graphicstyle(&mut self, style: GraphicStyle) -> GraphicStyleRef
pub fn add_graphicstyle(&mut self, style: GraphicStyle) -> GraphicStyleRef
Adds a style. Unnamed styles will be assigned an automatic name.
sourcepub fn remove_graphicstyle<S: AsRef<str>>(
&mut self,
name: S
) -> Option<GraphicStyle>
pub fn remove_graphicstyle<S: AsRef<str>>( &mut self, name: S ) -> Option<GraphicStyle>
Removes a style.
sourcepub fn iter_graphicstyles(&self) -> impl Iterator<Item = &GraphicStyle>
pub fn iter_graphicstyles(&self) -> impl Iterator<Item = &GraphicStyle>
Returns iterator over styles.
sourcepub fn graphicstyle<S: AsRef<str>>(&self, name: S) -> Option<&GraphicStyle>
pub fn graphicstyle<S: AsRef<str>>(&self, name: S) -> Option<&GraphicStyle>
Returns the style.
sourcepub fn graphicstyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut GraphicStyle>
pub fn graphicstyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut GraphicStyle>
Returns the mutable style.
sourcepub fn add_boolean_format(
&mut self,
vstyle: ValueFormatBoolean
) -> ValueFormatRef
pub fn add_boolean_format( &mut self, vstyle: ValueFormatBoolean ) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_boolean_format(
&mut self,
name: &str
) -> Option<ValueFormatBoolean>
pub fn remove_boolean_format( &mut self, name: &str ) -> Option<ValueFormatBoolean>
Removes the format.
sourcepub fn iter_boolean_formats(&self) -> impl Iterator<Item = &ValueFormatBoolean>
pub fn iter_boolean_formats(&self) -> impl Iterator<Item = &ValueFormatBoolean>
Returns iterator over formats.
sourcepub fn boolean_format(&self, name: &str) -> Option<&ValueFormatBoolean>
pub fn boolean_format(&self, name: &str) -> Option<&ValueFormatBoolean>
Returns the format.
sourcepub fn boolean_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatBoolean>
pub fn boolean_format_mut( &mut self, name: &str ) -> Option<&mut ValueFormatBoolean>
Returns the mutable format.
sourcepub fn add_number_format(&mut self, vstyle: ValueFormatNumber) -> ValueFormatRef
pub fn add_number_format(&mut self, vstyle: ValueFormatNumber) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_number_format(&mut self, name: &str) -> Option<ValueFormatNumber>
pub fn remove_number_format(&mut self, name: &str) -> Option<ValueFormatNumber>
Removes the format.
sourcepub fn iter_number_formats(&self) -> impl Iterator<Item = &ValueFormatNumber>
pub fn iter_number_formats(&self) -> impl Iterator<Item = &ValueFormatNumber>
Returns iterator over formats.
sourcepub fn number_format(&self, name: &str) -> Option<&ValueFormatBoolean>
pub fn number_format(&self, name: &str) -> Option<&ValueFormatBoolean>
Returns the format.
sourcepub fn number_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatBoolean>
pub fn number_format_mut( &mut self, name: &str ) -> Option<&mut ValueFormatBoolean>
Returns the mutable format.
sourcepub fn add_percentage_format(
&mut self,
vstyle: ValueFormatPercentage
) -> ValueFormatRef
pub fn add_percentage_format( &mut self, vstyle: ValueFormatPercentage ) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_percentage_format(
&mut self,
name: &str
) -> Option<ValueFormatPercentage>
pub fn remove_percentage_format( &mut self, name: &str ) -> Option<ValueFormatPercentage>
Removes the format.
sourcepub fn iter_percentage_formats(
&self
) -> impl Iterator<Item = &ValueFormatPercentage>
pub fn iter_percentage_formats( &self ) -> impl Iterator<Item = &ValueFormatPercentage>
Returns iterator over formats.
sourcepub fn percentage_format(&self, name: &str) -> Option<&ValueFormatPercentage>
pub fn percentage_format(&self, name: &str) -> Option<&ValueFormatPercentage>
Returns the format.
sourcepub fn percentage_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatPercentage>
pub fn percentage_format_mut( &mut self, name: &str ) -> Option<&mut ValueFormatPercentage>
Returns the mutable format.
sourcepub fn add_currency_format(
&mut self,
vstyle: ValueFormatCurrency
) -> ValueFormatRef
pub fn add_currency_format( &mut self, vstyle: ValueFormatCurrency ) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_currency_format(
&mut self,
name: &str
) -> Option<ValueFormatCurrency>
pub fn remove_currency_format( &mut self, name: &str ) -> Option<ValueFormatCurrency>
Removes the format.
sourcepub fn iter_currency_formats(
&self
) -> impl Iterator<Item = &ValueFormatCurrency>
pub fn iter_currency_formats( &self ) -> impl Iterator<Item = &ValueFormatCurrency>
Returns iterator over formats.
sourcepub fn currency_format(&self, name: &str) -> Option<&ValueFormatCurrency>
pub fn currency_format(&self, name: &str) -> Option<&ValueFormatCurrency>
Returns the format.
sourcepub fn currency_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatCurrency>
pub fn currency_format_mut( &mut self, name: &str ) -> Option<&mut ValueFormatCurrency>
Returns the mutable format.
sourcepub fn add_text_format(&mut self, vstyle: ValueFormatText) -> ValueFormatRef
pub fn add_text_format(&mut self, vstyle: ValueFormatText) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_text_format(&mut self, name: &str) -> Option<ValueFormatText>
pub fn remove_text_format(&mut self, name: &str) -> Option<ValueFormatText>
Removes the format.
sourcepub fn iter_text_formats(&self) -> impl Iterator<Item = &ValueFormatText>
pub fn iter_text_formats(&self) -> impl Iterator<Item = &ValueFormatText>
Returns iterator over formats.
sourcepub fn text_format(&self, name: &str) -> Option<&ValueFormatText>
pub fn text_format(&self, name: &str) -> Option<&ValueFormatText>
Returns the format.
sourcepub fn text_format_mut(&mut self, name: &str) -> Option<&mut ValueFormatText>
pub fn text_format_mut(&mut self, name: &str) -> Option<&mut ValueFormatText>
Returns the mutable format.
sourcepub fn add_datetime_format(
&mut self,
vstyle: ValueFormatDateTime
) -> ValueFormatRef
pub fn add_datetime_format( &mut self, vstyle: ValueFormatDateTime ) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_datetime_format(
&mut self,
name: &str
) -> Option<ValueFormatDateTime>
pub fn remove_datetime_format( &mut self, name: &str ) -> Option<ValueFormatDateTime>
Removes the format.
sourcepub fn iter_datetime_formats(
&self
) -> impl Iterator<Item = &ValueFormatDateTime>
pub fn iter_datetime_formats( &self ) -> impl Iterator<Item = &ValueFormatDateTime>
Returns iterator over formats.
sourcepub fn datetime_format(&self, name: &str) -> Option<&ValueFormatDateTime>
pub fn datetime_format(&self, name: &str) -> Option<&ValueFormatDateTime>
Returns the format.
sourcepub fn datetime_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatDateTime>
pub fn datetime_format_mut( &mut self, name: &str ) -> Option<&mut ValueFormatDateTime>
Returns the mutable format.
sourcepub fn add_timeduration_format(
&mut self,
vstyle: ValueFormatTimeDuration
) -> ValueFormatRef
pub fn add_timeduration_format( &mut self, vstyle: ValueFormatTimeDuration ) -> ValueFormatRef
Adds a value format. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_timeduration_format(
&mut self,
name: &str
) -> Option<ValueFormatTimeDuration>
pub fn remove_timeduration_format( &mut self, name: &str ) -> Option<ValueFormatTimeDuration>
Removes the format.
sourcepub fn iter_timeduration_formats(
&self
) -> impl Iterator<Item = &ValueFormatTimeDuration>
pub fn iter_timeduration_formats( &self ) -> impl Iterator<Item = &ValueFormatTimeDuration>
Returns iterator over formats.
sourcepub fn timeduration_format(
&self,
name: &str
) -> Option<&ValueFormatTimeDuration>
pub fn timeduration_format( &self, name: &str ) -> Option<&ValueFormatTimeDuration>
Returns the format.
sourcepub fn timeduration_format_mut(
&mut self,
name: &str
) -> Option<&mut ValueFormatTimeDuration>
pub fn timeduration_format_mut( &mut self, name: &str ) -> Option<&mut ValueFormatTimeDuration>
Returns the mutable format.
sourcepub fn add_pagestyle(&mut self, pstyle: PageStyle) -> PageStyleRef
pub fn add_pagestyle(&mut self, pstyle: PageStyle) -> PageStyleRef
Adds a value PageStyle. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_pagestyle<S: AsRef<str>>(&mut self, name: S) -> Option<PageStyle>
pub fn remove_pagestyle<S: AsRef<str>>(&mut self, name: S) -> Option<PageStyle>
Removes the PageStyle.
sourcepub fn iter_pagestyles(&self) -> impl Iterator<Item = &PageStyle>
pub fn iter_pagestyles(&self) -> impl Iterator<Item = &PageStyle>
Returns iterator over formats.
sourcepub fn pagestyle_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut PageStyle>
pub fn pagestyle_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut PageStyle>
Returns the mutable PageStyle.
sourcepub fn add_masterpage(&mut self, mpage: MasterPage) -> MasterPageRef
pub fn add_masterpage(&mut self, mpage: MasterPage) -> MasterPageRef
Adds a value MasterPage. Unnamed formats will be assigned an automatic name.
sourcepub fn remove_masterpage<S: AsRef<str>>(
&mut self,
name: S
) -> Option<MasterPage>
pub fn remove_masterpage<S: AsRef<str>>( &mut self, name: S ) -> Option<MasterPage>
Removes the MasterPage.
sourcepub fn iter_masterpages(&self) -> impl Iterator<Item = &MasterPage>
pub fn iter_masterpages(&self) -> impl Iterator<Item = &MasterPage>
Returns iterator over formats.
sourcepub fn masterpage<S: AsRef<str>>(&self, name: S) -> Option<&MasterPage>
pub fn masterpage<S: AsRef<str>>(&self, name: S) -> Option<&MasterPage>
Returns the MasterPage.
sourcepub fn masterpage_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut MasterPage>
pub fn masterpage_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut MasterPage>
Returns the mutable MasterPage.
sourcepub fn add_validation(&mut self, valid: Validation) -> ValidationRef
pub fn add_validation(&mut self, valid: Validation) -> ValidationRef
Adds a Validation. Nameless validations will be assigned a name.
sourcepub fn remove_validation<S: AsRef<str>>(
&mut self,
name: S
) -> Option<Validation>
pub fn remove_validation<S: AsRef<str>>( &mut self, name: S ) -> Option<Validation>
Removes a Validation.
sourcepub fn iter_validations(&self) -> impl Iterator<Item = &Validation>
pub fn iter_validations(&self) -> impl Iterator<Item = &Validation>
Returns iterator over formats.
sourcepub fn validation<S: AsRef<str>>(&self, name: S) -> Option<&Validation>
pub fn validation<S: AsRef<str>>(&self, name: S) -> Option<&Validation>
Returns the Validation.
sourcepub fn validation_mut<S: AsRef<str>>(
&mut self,
name: S
) -> Option<&mut Validation>
pub fn validation_mut<S: AsRef<str>>( &mut self, name: S ) -> Option<&mut Validation>
Returns a mutable Validation.
sourcepub fn add_manifest(&mut self, manifest: Manifest)
pub fn add_manifest(&mut self, manifest: Manifest)
Adds a manifest entry, replaces an existing one with the same name.
sourcepub fn remove_manifest(&mut self, path: &str) -> Option<Manifest>
pub fn remove_manifest(&mut self, path: &str) -> Option<Manifest>
Removes a manifest entry.
sourcepub fn iter_manifest(&self) -> impl Iterator<Item = &Manifest>
pub fn iter_manifest(&self) -> impl Iterator<Item = &Manifest>
Iterates the manifest.
sourcepub fn manifest(&self, path: &str) -> Option<&Manifest>
pub fn manifest(&self, path: &str) -> Option<&Manifest>
Returns the manifest entry for the path
sourcepub fn manifest_mut(&mut self, path: &str) -> Option<&mut Manifest>
pub fn manifest_mut(&mut self, path: &str) -> Option<&mut Manifest>
Returns the manifest entry for the path
sourcepub fn metadata_mut(&mut self) -> &mut Metadata
pub fn metadata_mut(&mut self) -> &mut Metadata
Gives access to meta-data.