### Guide Struct Implementation: default Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.Guide.html Returns the default value for a Guide. This is useful for initializing a Guide with standard settings. ```rust fn default() -> Guide ``` -------------------------------- ### Guide Struct Implementation: clone Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.Guide.html Returns a duplicate of the Guide value. This is a standard way to create a copy. ```rust fn clone(&self) -> Guide ``` -------------------------------- ### Get Attribute Value Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/common/xml.rs.html Retrieves the decoded value of a specific attribute from an XML start tag. Returns None if the attribute is not found. Requires the XML reader and the start tag event. ```rust fn attr_value( reader: &Reader<&[u8]>, start: &quick_xml::events::BytesStart<'_>, name: &[u8], ) -> Result, SdkError> { for attr in start.attributes() { let attr = attr?; if attr.key.as_ref() == name { return Ok(Some(decode_attr_value(&attr, reader.decoder())?)); } } Ok(None) } ``` -------------------------------- ### BookmarkStart Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.BookmarkStart.html Provides methods for creating, serializing, and deserializing BookmarkStart objects. ```APIDOC ## impl BookmarkStart ### Methods - `pub fn from_bytes(bytes: &[u8]) -> Result`: Creates a BookmarkStart from bytes. - `pub fn from_str(s: &str) -> Result`: Creates a BookmarkStart from a string. - `pub fn from_reader(reader: R) -> Result`: Creates a BookmarkStart from a reader. - `pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>`: Writes the BookmarkStart to an XML writer. - `pub fn to_xml_bytes(&self) -> Result, Error>`: Serializes the BookmarkStart to XML bytes. - `pub fn to_xml(&self) -> Result`: Serializes the BookmarkStart to an XML string. ``` -------------------------------- ### CustomChartsheetView Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_openxmlformats_org_spreadsheetml_2006_main.rs.html Represents a custom view for a chart sheet, including GUID, scale, state, and page setup options. ```APIDOC ## CustomChartsheetView ### Description Represents a custom view for a chart sheet, including GUID, scale, state, and page setup options. ### Fields - **guid** (StringValue) - Required - GUID (Must be a valid GUID format) - **scale** (Option) - Optional - Print Scale - **state** (Option) - Optional - Visible State - **zoom_to_fit** (Option) - Optional - Zoom To Fit - **page_margins** (Option) - Optional - Page Margins. - **chart_sheet_page_setup** (Option) - Optional - Chart Sheet Page Setup - **header_footer** (Option>) - Optional - Header Footer Settings. ``` -------------------------------- ### NumberingStart Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.NumberingStart.html Lists the available methods for the NumberingStart struct. ```APIDOC ## Implementations ### impl NumberingStart * `pub fn from_bytes(bytes: &[u8]) -> Result` * `pub fn from_str(s: &str) -> Result` * `pub fn from_reader(reader: R) -> Result` * `pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` * `pub fn to_xml_bytes(&self) -> Result, Error>` * `pub fn to_xml(&self) -> Result` ``` -------------------------------- ### Extend Vec from Range (End) Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_drawing_2013_main_command/type.GraphicParentMonikerList.html Appends elements from a specified range within the Vec to its end. This example extends with elements starting from index 2 to the end. ```rust let mut characters = vec!['a', 'b', 'c', 'd', 'e']; characters.extend_from_within(2..); assert_eq!(characters, ['a', 'b', 'c', 'd', 'e', 'c', 'd', 'e']); ``` -------------------------------- ### SdkPart Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/quick_access_toolbar_customizations_part/struct.QuickAccessToolbarCustomizationsPart.html Core methods and constants for the QuickAccessToolbarCustomizationsPart as an SdkPart. ```APIDOC ## Constants - `RELATIONSHIP_TYPE`: &'static str - `PATH_PREFIX`: &'static str - `CONTENT_TYPE`: &'static str - `TARGET_NAME`: &'static str - `EXTENSION`: &'static str ## Methods #### fn from_part_id(part_id: PartId) -> Self #### fn from_relationship_id( relationship_id: impl Into, part_id: PartId, ) -> Self #### fn set_relationship_id(&mut self, relationship_id: String) #### fn part_id(&self) -> PartId #### fn relationship_id(&self) -> Option<&str> #### fn relationship_type() -> &'static str #### fn path_prefix() -> &'static str #### fn static_content_type() -> &'static str #### fn target_name() -> &'static str #### fn extension() -> &'static str #### fn missing_part_storage_error(&self) -> SdkError #### fn next_relationship_id( &self, package: &P, ) -> Result #### fn added_relationship_ref<'a, P: SdkPackage>( &self, package: &'a P, relationship_id: &str, ) -> Result, SdkError> #### fn child_part_by_relationship_type( &self, package: &P, relationship_type: &str, ) -> Option where P: SdkPackage, T: SdkPart, #### fn child_parts_by_relationship_type<'a, P, T>( &'a self, package: &'a P, relationship_type: &'a str, ) -> impl Iterator + 'a where P: SdkPackage, T: SdkPart, #### fn add_external_relationship<'a, P: SdkPackage>( &self, package: &'a mut P, relationship_id: impl Into, relationship_type: impl Into, target: impl Into, ) -> Result, SdkError> #### fn add_external_relationship_auto_id<'a, P: SdkPackage>( &self, package: &'a mut P, relationship_type: impl Into, target: impl Into, ) -> Result, SdkError> #### fn add_hyperlink_relationship<'a, P: SdkPackage>( &self, package: &'a mut P, relationship_id: impl Into, target: impl Into, ) -> Result, SdkError> #### fn add_hyperlink_relationship_with_mode<'a, P: SdkPackage>( &self, package: &'a mut P, relationship_id: impl Into, target: impl Into, target_mode: TargetMode, ) -> Result, SdkError> #### fn add_hyperlink_relationship_auto_id<'a, P: SdkPackage>( &self, package: &'a mut P, target: impl Into, target_mode: TargetMode, ) -> Result, SdkError> #### fn add_audio_reference_relationship( &self, package: &mut P, media_data_part: &MediaDataPart, ) -> Result #### fn add_audio_reference_relationship_with_id( &self, package: &mut P, media_data_part: &MediaDataPart, relationship_id: impl Into, ) -> Result #### fn add_media_reference_relationship( &self, package: &mut P, media_data_part: &MediaDataPart, ) -> Result #### fn add_media_reference_relationship_with_id( &self, package: &mut P, media_data_part: &MediaDataPart, relationship_id: impl Into, ) -> Result #### fn add_video_reference_relationship( &self, package: &mut P, media_data_part: &MediaDataPart, ) -> Result #### fn add_video_reference_relationship_with_id( &self, package: &mut P, media_data_part: &MediaDataPart, relationship_id: impl Into, ) -> Result #### fn add_data_part_reference_relationship_from_existing( &self, package: &mut P, relationship: Relationship, ) -> Result ``` -------------------------------- ### StartConnection Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_main/struct.StartConnection.html Provides methods for interacting with the StartConnection struct, including serialization and deserialization. ```APIDOC ### impl StartConnection #### pub fn from_bytes(bytes: &[u8]) -> Result #### pub fn from_str(s: &str) -> Result #### pub fn from_reader(reader: R) -> Result #### pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error> #### pub fn to_xml_bytes(&self) -> Result, Error> #### pub fn to_xml(&self) -> Result ``` -------------------------------- ### Using as_non_null to get a NonNull pointer to a vector's buffer Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_drawing_2013_main_command/type.DrawingMonikerList.html This example demonstrates allocating a vector and obtaining a NonNull pointer to its buffer. It shows how to initialize elements via raw pointer writes and then set the vector's length. The caller must ensure the vector outlives the pointer. ```rust #![feature(box_vec_non_null)] // Allocate vector big enough for 4 elements. let size = 4; let mut x: Vec = Vec::with_capacity(size); let x_ptr = x.as_non_null(); // Initialize elements via raw pointer writes, then set length. unsafe { for i in 0..size { x_ptr.add(i).write(i as i32); } x.set_len(size); } assert_eq!(&*x, &[0, 1, 2, 3]); ``` -------------------------------- ### PermStart Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.PermStart.html Provides methods for creating, serializing, and deserializing PermStart objects. ```APIDOC ## impl PermStart ### Methods - `from_bytes(bytes: &[u8]) -> Result`: Creates a PermStart instance from a byte slice. - `from_str(s: &str) -> Result`: Creates a PermStart instance from a string slice. - `from_reader(reader: R) -> Result`: Creates a PermStart instance from a reader. - `write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>`: Writes the PermStart instance to an XML writer. - `to_xml_bytes(&self) -> Result, Error>`: Serializes the PermStart instance to XML bytes. - `to_xml(&self) -> Result`: Serializes the PermStart instance to an XML string. ``` -------------------------------- ### Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_2006_01_customui/struct.QuickAccessToolbarControlClone.html Provides methods for creating, serializing, and deserializing QuickAccessToolbarControlClone objects. ```APIDOC ## Implementations ### impl QuickAccessToolbarControlClone - **from_bytes(bytes: &[u8]) -> Result** Creates a `QuickAccessToolbarControlClone` from a byte slice. - **from_str(s: &str) -> Result** Creates a `QuickAccessToolbarControlClone` from a string slice. - **from_reader(reader: R) -> Result** Creates a `QuickAccessToolbarControlClone` from a buffered reader. - **write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>** Writes the `QuickAccessToolbarControlClone` to an XML writer. - **to_xml_bytes(&self) -> Result, Error>** Serializes the `QuickAccessToolbarControlClone` to a byte vector. - **to_xml(&self) -> Result** Serializes the `QuickAccessToolbarControlClone` to an XML string. ``` -------------------------------- ### Guide Struct Definition Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.Guide.html Defines the structure of a Guide, including its orientation and position. Use this struct when working with guide elements in presentations. ```rust pub struct Guide { pub orientation: Option, pub position: Option, } ``` -------------------------------- ### Guide Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main.rs.html Represents a single guide, defining its orientation and position. ```APIDOC ## Guide ### Description Defines a guide with its orientation and position. ### Struct `Guide` ### Fields - `orientation` (Option): The orientation of the guide (e.g., horizontal, vertical). - `position` (Option): The position of the guide on the slide. ``` -------------------------------- ### ShowPhantom Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_office_document_2006_math/struct.ShowPhantom.html Provides methods for creating, serializing, and deserializing ShowPhantom instances. ```APIDOC ## impl ShowPhantom ### Methods - `from_bytes(bytes: &[u8]) -> Result`: Creates a ShowPhantom from bytes. - `from_str(s: &str) -> Result`: Creates a ShowPhantom from a string. - `from_reader(reader: R) -> Result`: Creates a ShowPhantom from a reader. - `write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>`: Writes the ShowPhantom to an XML writer. - `to_xml_bytes(&self) -> Result, Error>`: Serializes the ShowPhantom to XML bytes. - `to_xml(&self) -> Result`: Serializes the ShowPhantom to an XML string. ``` -------------------------------- ### Clone Implementation for ExtendedGuide Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_powerpoint_2012_main/struct.ExtendedGuide.html Provides a method to create a duplicate of an ExtendedGuide instance. This is useful for copying guide configurations. ```rust fn clone(&self) -> ExtendedGuide ``` -------------------------------- ### ExtendedGuide Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_microsoft_com_office_powerpoint_2012_main.rs.html Represents an extended guide element, used within guide lists. ```APIDOC ## ExtendedGuide ### Description Defines the ExtendedGuide Class, a component used within guide lists for slides and notes. ``` -------------------------------- ### Get ID of Part Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/extended_chart_part/struct.ExtendedChartPart.html Gets the ID of a given part within the package. ```APIDOC ## get_id_of_part<'a, P: SdkPackage, T: SdkPart> ### Description Gets the ID of a given part within the package. ### Signature ```rust fn get_id_of_part<'a, P: SdkPackage, T: SdkPart>( &'a self, package: &'a P, part: &T, ) -> Option<&'a str> ``` ``` -------------------------------- ### QuickAccessToolbar Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_2006_01_customui/struct.QuickAccessToolbar.html Provides methods for creating, serializing, and deserializing QuickAccessToolbar objects. ```APIDOC ## impl QuickAccessToolbar ### `pub fn from_bytes(bytes: &[u8]) -> Result` Creates a QuickAccessToolbar from a byte slice. ### `pub fn from_str(s: &str) -> Result` Creates a QuickAccessToolbar from a string slice. ### `pub fn from_reader(reader: R) -> Result` Creates a QuickAccessToolbar from a reader. ### `pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` Writes the QuickAccessToolbar to an XML writer. ### `pub fn to_xml_bytes(&self) -> Result, Error>` Serializes the QuickAccessToolbar to XML bytes. ### `pub fn to_xml(&self) -> Result` Serializes the QuickAccessToolbar to an XML string. ``` -------------------------------- ### Guide Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.Guide.html Provides methods for creating, serializing, and deserializing Guide objects to and from XML. ```APIDOC ### impl Guide #### pub fn from_bytes(bytes: &[u8]) -> Result Parses guide data from a byte slice. #### pub fn from_str(s: &str) -> Result Parses guide data from a string slice. #### pub fn from_reader(reader: R) -> Result Parses guide data from a buffered reader. #### pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error> Writes the guide data to an XML writer. #### pub fn to_xml_bytes(&self) -> Result, Error> Serializes the guide data to a byte vector in XML format. #### pub fn to_xml(&self) -> Result Serializes the guide data to a string in XML format. ``` -------------------------------- ### QuickTimeFromFile Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_main/struct.QuickTimeFromFile.html Provides methods for creating, serializing, and deserializing QuickTimeFromFile objects. ```APIDOC ## impl QuickTimeFromFile ### Methods * `pub fn from_bytes(bytes: &[u8]) -> Result` * `pub fn from_str(s: &str) -> Result` * `pub fn from_reader(reader: R) -> Result` * `pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` * `pub fn to_xml_bytes(&self) -> Result, Error>` * `pub fn to_xml(&self) -> Result` ``` -------------------------------- ### WllMacroKeyboardCustomization Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_word_2006_wordml/struct.WllMacroKeyboardCustomization.html Provides methods for creating, serializing, and deserializing WllMacroKeyboardCustomization objects. ```APIDOC ## impl WllMacroKeyboardCustomization ### Methods * `pub fn from_bytes(bytes: &[u8]) -> Result` - Creates a WllMacroKeyboardCustomization from bytes. * `pub fn from_str(s: &str) -> Result` - Creates a WllMacroKeyboardCustomization from a string. * `pub fn from_reader(reader: R) -> Result` - Creates a WllMacroKeyboardCustomization from a reader. * `pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` - Writes the WllMacroKeyboardCustomization to an XML writer. * `pub fn to_xml_bytes(&self) -> Result, Error>` - Serializes the WllMacroKeyboardCustomization to XML bytes. * `pub fn to_xml(&self) -> Result` - Serializes the WllMacroKeyboardCustomization to an XML string. ``` -------------------------------- ### Get ID of Part Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/chartsheet_part/struct.ChartsheetPart.html Gets the relationship ID of a given part within the package. ```APIDOC ## get_id_of_part<'a, P: SdkPackage, T: SdkPart> ### Description Gets the relationship ID of a given part within the package. ### Method Signature ```rust fn get_id_of_part<'a, P: SdkPackage, T: SdkPart>( &'a self, package: &'a P, part: &T, ) -> Option<&'a str> ``` ### Parameters - `package`: A reference to the SDK package. - `part`: A reference to the part for which to get the ID. ``` -------------------------------- ### PageSetup Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_chart/struct.PageSetup.html Provides methods for creating, serializing, and deserializing PageSetup objects. ```APIDOC ## impl PageSetup ### Methods * `fn from_bytes(bytes: &[u8]) -> Result` - Creates a PageSetup from byte data. * `fn from_str(s: &str) -> Result` - Creates a PageSetup from a string. * `fn from_reader(reader: R) -> Result` - Creates a PageSetup from a reader. * `fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` - Writes the PageSetup to an XML writer. * `fn to_xml_bytes(&self) -> Result, Error>` - Serializes the PageSetup to XML bytes. * `fn to_xml(&self) -> Result` - Serializes the PageSetup to an XML string. ``` -------------------------------- ### Guide Struct Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.Guide.html Represents a guide element within the presentationml schema, used for positioning and orientation. ```APIDOC ## Struct Guide ### Description A Guide. ### Fields - **orientation**: Option - Guide Orientation - **position**: Option - Guide Position ``` -------------------------------- ### PageSetup Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_drawing_2014_chartex/struct.PageSetup.html Provides methods for creating, serializing, and deserializing PageSetup objects. ```APIDOC ### impl PageSetup #### `pub fn from_bytes(bytes: &[u8]) -> Result` Creates a PageSetup from a byte slice. #### `pub fn from_str(s: &str) -> Result` Creates a PageSetup from a string slice. #### `pub fn from_reader(reader: R) -> Result` Creates a PageSetup from a reader. #### `pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` Writes the PageSetup as XML to a writer. #### `pub fn to_xml_bytes(&self) -> Result, Error>` Serializes the PageSetup to XML bytes. #### `pub fn to_xml(&self) -> Result` Serializes the PageSetup to an XML string. ``` -------------------------------- ### PageSetup Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_spreadsheetml_2006_main/struct.PageSetup.html This snippet details the available methods for interacting with the PageSetup struct, including serialization and deserialization. ```APIDOC ## Implementations for PageSetup ### `impl PageSetup` - `from_bytes(bytes: &[u8]) -> Result`: Deserializes PageSetup from bytes. - `from_str(s: &str) -> Result`: Deserializes PageSetup from a string. - `from_reader(reader: R) -> Result`: Deserializes PageSetup from a reader. - `write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>`: Writes PageSetup to an XML writer. - `to_xml_bytes(&self) -> Result, Error>`: Serializes PageSetup to XML bytes. - `to_xml(&self) -> Result`: Serializes PageSetup to an XML string. ``` -------------------------------- ### Try Get Part by ID Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/sdk.rs.html An alternative method to get a part by its relationship ID, returning an Option. ```APIDOC ## try_get_part_by_id ### Description Attempts to retrieve a part using its relationship ID. Returns `Some(PartRef)` if found, and `None` otherwise. ### Method `try_get_part_by_id(&self, relationship_id: &str) -> Option` ### Parameters - **relationship_id** (str) - The ID of the relationship pointing to the part. ### Returns An `Option` containing the `PartRef` if the part exists, otherwise `None`. ``` -------------------------------- ### Guide Struct Implementation: eq (PartialEq) Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.Guide.html Tests for equality between two Guide instances. Used by the == operator. ```rust fn eq(&self, other: &Guide) -> bool ``` -------------------------------- ### Create QuickAccessToolbarCustomizationsPart Reference Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/parts.rs.html Creates a reference to a QuickAccessToolbarCustomizationsPart. This part is also associated with 'application/xml' content types for UI customization. ```rust if part.content_type() == "application/xml" => { return Some( ::make_part_ref( storage, part_id, relationship_id, ), ); } ``` -------------------------------- ### Iterate and Get Parts Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/worksheet_comments_part/struct.WorksheetCommentsPart.html Provides methods to iterate over all parts, parent parts, and get specific parts by ID. ```APIDOC ## parts<'a, P: SdkPackage + Sized> ### Description Returns an iterator over all parts in the package, yielding pairs of ID and Part. ### Signature ```rust fn parts<'a, P: SdkPackage + Sized>( &'a self, package: &'a P, ) -> impl Iterator> + 'a ``` ## get_all_parts<'a, P: SdkPackage + Sized> ### Description Returns an iterator over all parts in the package. ### Signature ```rust fn get_all_parts<'a, P: SdkPackage + Sized>( &'a self, package: &'a P, ) -> impl Iterator + 'a ``` ## get_parent_parts<'a, P: SdkPackage + Sized> ### Description Returns an iterator over the parent parts of the current part. ### Signature ```rust fn get_parent_parts<'a, P: SdkPackage + Sized>( &'a self, package: &'a P, ) -> impl Iterator + 'a ``` ## get_part_by_id ### Description Retrieves a part from the package by its relationship ID, returning an Option. ### Signature ```rust fn get_part_by_id( &self, package: &P, relationship_id: &str, ) -> Option ``` ## get_part_by_id_required ### Description Retrieves a part from the package by its relationship ID, returning a Result. ### Signature ```rust fn get_part_by_id_required( &self, package: &P, relationship_id: &str, ) -> Result ``` ## try_get_part_by_id ### Description Attempts to retrieve a part from the package by its relationship ID, returning an Option. ### Signature ```rust fn try_get_part_by_id( &self, package: &P, relationship_id: &str, ) -> Option ``` ``` -------------------------------- ### NotesGuideList default Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_powerpoint_2012_main/struct.NotesGuideList.html Provides a default instance of NotesGuideList. This is useful for initializing the struct when no specific data is available. ```rust fn default() -> NotesGuideList ``` -------------------------------- ### Get ID of Part Required Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/extended_chart_part/struct.ExtendedChartPart.html Gets the ID of a given part within the package, returning an error if not found. ```APIDOC ## get_id_of_part_required<'a, P: SdkPackage, T: SdkPart> ### Description Gets the ID of a given part within the package, returning an error if not found. ### Signature ```rust fn get_id_of_part_required<'a, P: SdkPackage, T: SdkPart>( &'a self, package: &'a P, part: &T, ) -> Result<&'a str, SdkError> ``` ``` -------------------------------- ### GuideList PartialEq Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.GuideList.html Compares two GuideList instances for equality. ```rust fn eq(&self, other: &GuideList) -> bool ``` -------------------------------- ### StartSoundAction Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main.rs.html Defines the action to start a sound, including options for looping and the sound itself. ```APIDOC ## struct StartSoundAction ### Description Defines the action to start a sound. ### Fields - `r#loop` (Option): Loop Sound attribute. - `sound` (std::boxed::Box): The Sound element associated with this action. ``` -------------------------------- ### Get TypeId of a Generic Type T Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/common/struct.PartId.html Gets the `TypeId` of a generic type `T`. This is part of the `Any` trait implementation, which is automatically implemented for all types. ```rust fn type_id(&self) -> TypeId ``` -------------------------------- ### PartialEq Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/quick_access_toolbar_customizations_part/struct.QuickAccessToolbarCustomizationsPart.html Provides methods for comparing QuickAccessToolbarCustomizationsPart instances for equality. ```APIDOC ## fn eq(&self, other: &QuickAccessToolbarCustomizationsPart) -> bool Tests for `self` and `other` values to be equal, and is used by `==`. ## fn ne(&self, other: &Rhs) -> bool Tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason. ``` -------------------------------- ### PersistentDocumentId Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_microsoft_com_office_word_2012_wordml.rs.html Represents a persistent document identifier, typically a GUID. It includes a 'val' attribute that must conform to a specific GUID format. ```APIDOC ## PersistentDocumentId ### Description Represents a persistent document identifier, typically a GUID. It includes a 'val' attribute that must conform to a specific GUID format. ### Struct ```rust pub struct PersistentDocumentId { /// val #[sdk(attr(office2013, qname = "w15:val"))] #[sdk(pattern( source = 1u32, union = 0u64, regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}" ))] #[sdk(string_format(source = 1u32, union = 0u64, kind = "token"))] pub w15_val: Option, } ``` ``` -------------------------------- ### PhoneticGuideRaise Struct Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.PhoneticGuideRaise.html Defines the PhoneticGuideRaise struct, which holds the value for the distance between phonetic guide text and the phonetic guide base text. ```APIDOC ## Struct PhoneticGuideRaise ### Summary ``` pub struct PhoneticGuideRaise { pub val: Int16Value, } ``` ### Description Distance Between Phonetic Guide Text and Phonetic Guide Base Text. ``` -------------------------------- ### StartSoundAction Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.StartSoundAction.html Provides methods for converting StartSoundAction to and from XML, and for byte-level operations. ```APIDOC ### impl StartSoundAction #### pub fn from_bytes(bytes: &[u8]) -> Result Converts bytes to a StartSoundAction. #### pub fn from_str(s: &str) -> Result Converts a string to a StartSoundAction. #### pub fn from_reader(reader: R) -> Result Converts data from a reader to a StartSoundAction. #### pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error> Writes the StartSoundAction to an XML writer. #### pub fn to_xml_bytes(&self) -> Result, Error> Serializes the StartSoundAction to XML bytes. #### pub fn to_xml(&self) -> Result Serializes the StartSoundAction to an XML string. ``` -------------------------------- ### Accessing Document Root Element Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/main_document_part/struct.MainDocumentPart.html Provides methods to get, get mutable reference, and set the root element of the main document. ```APIDOC ## root_element ### Description Retrieves an immutable reference to the root element of the main document part. ### Method `root_element<'a, P: SdkPackage>(&self, package: &'a mut P) -> Result<&'a Document, SdkError>` ### Parameters - `package` (&'a mut P): A mutable reference to the SDK package. ### Response - `Result<&'a Document, SdkError>`: A result containing an immutable reference to the Document on success, or an SdkError on failure. ## root_element_mut ### Description Retrieves a mutable reference to the root element of the main document part. ### Method `root_element_mut<'a, P: SdkPackage>(&self, package: &'a mut P) -> Result<&'a mut Document, SdkError>` ### Parameters - `package` (&'a mut P): A mutable reference to the SDK package. ### Response - `Result<&'a mut Document, SdkError>`: A result containing a mutable reference to the Document on success, or an SdkError on failure. ## set_root_element ### Description Sets the root element of the main document part. ### Method `set_root_element(&self, package: &mut P, root_element: Document) -> Result<(), SdkError>` ### Parameters - `package` (&mut P): A mutable reference to the SDK package. - `root_element` (Document): The Document object to set as the root element. ### Response - `Result<(), SdkError>`: An empty result on success, or an SdkError on failure. ``` -------------------------------- ### StartSoundAction PartialEq Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.StartSoundAction.html Allows for comparing two StartSoundAction instances for equality. This is essential for testing and ensuring that two sound actions are configured identically. ```rust fn eq(&self, other: &StartSoundAction) -> bool ``` -------------------------------- ### SdkChoice Trait: Matches Start QName Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_chart/enum.Bar3DChartExtensionChoice.html Checks if the given byte slice matches a start qualified name for any variant of Bar3DChartExtensionChoice. ```rust fn matches_start_qname(_name: &[u8]) -> bool ``` -------------------------------- ### BookmarkStart TryInto Conversion Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.BookmarkStart.html Enables conversion from BookmarkStart into other types using `TryInto`. ```APIDOC ## impl TryInto for T where U: TryFrom ### Description Provides the `TryInto` trait implementation for converting `T` into other types. ### Associated Types - `type Error = >::Error` The type returned in the event of a conversion error. ### Methods #### fn try_into(self) -> Result>::Error> Performs the conversion. ``` -------------------------------- ### Try Get Part by ID - Rust Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/sdk.rs.html An alternative method to get a part by its relationship ID, returning an `Option`. This is functionally equivalent to `get_part_by_id`. ```rust fn try_get_part_by_id(&self, relationship_id: &str) -> Option where Self: Sized, { self.get_part_by_id(relationship_id) } ``` -------------------------------- ### StartBorder Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_spreadsheetml_2006_main/struct.StartBorder.html Provides methods for converting StartBorder to and from XML, and other utility functions. ```APIDOC ## impl StartBorder ### `from_bytes(bytes: &[u8]) -> Result` Deserializes a StartBorder instance from a byte slice. ### `from_str(s: &str) -> Result` Deserializes a StartBorder instance from a string slice. ### `from_reader(reader: R) -> Result` Deserializes a StartBorder instance from a buffered reader. ### `write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` Writes the StartBorder instance to an XML writer. ### `to_xml_bytes(&self) -> Result, Error>` Serializes the StartBorder instance to XML bytes. ### `to_xml(&self) -> Result` Serializes the StartBorder instance to an XML string. ``` -------------------------------- ### StartingElementValues Enum Definition Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_diagram/enum.StartingElementValues.html Defines the possible starting elements for diagrams. Use this enum to specify whether a diagram starts with a Node or a Transition. ```rust pub enum StartingElementValues { Node, Transition, } ``` -------------------------------- ### BookmarkStart TryFrom Conversion Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.BookmarkStart.html Enables conversion from other types into BookmarkStart using `TryFrom`. ```APIDOC ## impl TryFrom for T where U: Into ### Description Provides the `TryFrom` trait implementation for converting types into `T`. ### Associated Types - `type Error = Infallible` The type returned in the event of a conversion error. ### Methods #### fn try_from(value: U) -> Result>::Error> Performs the conversion. ``` -------------------------------- ### StartBorder Methods Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.StartBorder.html Provides documentation for methods related to the StartBorder struct, including creating owned data and converting values. ```APIDOC ## fn to_owned(&self) -> T Creates owned data from borrowed data, usually by cloning. ### Method `to_owned` ``` ```APIDOC ## fn clone_into(&self, target: &mut T) Uses borrowed data to replace owned data, usually by cloning. ### Method `clone_into` ``` ```APIDOC ## fn to_string(&self) -> String Converts the given value to a `String`. ### Method `to_string` ``` ```APIDOC ## fn try_from(value: U) -> Result>::Error> Performs the conversion. ### Method `try_from` #### Associated Type - `Error`: The type returned in the event of a conversion error. ``` ```APIDOC ## fn try_into(self) -> Result>::Error> Performs the conversion. ### Method `try_into` #### Associated Type - `Error`: The type returned in the event of a conversion error. ``` -------------------------------- ### Reflection Effect Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_main.rs.html Defines the properties for a reflection effect, including blur radius, start and end opacity, start and end positions, distance, and direction. ```APIDOC ## Reflection Effect ### Description Defines the properties for a reflection effect, including blur radius, start and end opacity, start and end positions, distance, and direction. ### Struct `Reflection` ### Attributes - `blur_radius` (Option): Blur Radius. Range: 0 to 2147483647. - `start_opacity` (Option): Start Opacity. Range: 0 to 100000. - `start_position` (Option): Start Position. Range: 0 to 100000. - `end_alpha` (Option): End Alpha. Range: 0 to 100000. - `end_position` (Option): End Position. Range: 0 to 100000. - `distance` (Option): Distance. Range: 0 to 2147483647. - `direction` (Option): Direction. Range: 0 to 21600000. ``` -------------------------------- ### Try Get Part by Relationship ID - Rust Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/sdk.rs.html An alternative method to get a part by its relationship ID, returning `Option`. It is functionally equivalent to `get_part_by_id`. ```rust self.get_part_by_id(package, relationship_id) ``` -------------------------------- ### PartialEq Implementation for OpenSettings Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/sdk/struct.OpenSettings.html Enables equality comparison for OpenSettings instances. ```APIDOC ### impl PartialEq for OpenSettings #### fn eq(&self, other: &OpenSettings) -> bool Tests for `self` and `other` values to be equal, and is used by `==`. ``` ```APIDOC #### fn ne(&self, other: &Rhs) -> bool Tests for `!=`. ``` -------------------------------- ### StartOverrideNumberingValue Struct Definition Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.StartOverrideNumberingValue.html Defines the structure for a numbering level starting value override. Use this when you need to specify a custom starting number for a list level. ```rust pub struct StartOverrideNumberingValue { pub val: Int32Value, } ``` -------------------------------- ### ShowMarker Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_chart/struct.ShowMarker.html Provides methods for creating, serializing, and deserializing ShowMarker instances. ```APIDOC ## Implementations ### impl ShowMarker #### pub fn from_bytes(bytes: &[u8]) -> Result #### pub fn from_str(s: &str) -> Result #### pub fn from_reader(reader: R) -> Result #### pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error> #### pub fn to_xml_bytes(&self) -> Result, Error> #### pub fn to_xml(&self) -> Result ``` -------------------------------- ### SdkChoice Specific Start QName Matching Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_2009_07_customui/enum.BackstageGroupChoice.html Checks if a given byte slice matches the specific start qualified name for BackstageGroupChoice. This is used during XML parsing. ```rust fn matches_specific_start_qname(name: &[u8]) -> bool ``` -------------------------------- ### Collect Iterator into Vec - O(1) Example Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_powerpoint_2013_main_command/type.CustomXmlPartMonikerList.html Demonstrates collecting an iterator into a `VecDeque` and then converting it to a `Vec`. This example shows an O(1) operation where the underlying pointer remains the same. ```rust use std::collections::VecDeque; // This one is *O*(1). let deque: VecDeque<_> = (1..5).collect(); let ptr = deque.as_slices().0.as_ptr(); let vec = Vec::from(deque); assert_eq!(vec, [1, 2, 3, 4]); assert_eq!(vec.as_ptr(), ptr); ``` -------------------------------- ### BackstageSubMenu Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_2009_07_customui/struct.BackstageSubMenu.html Provides methods for creating, serializing, and deserializing BackstageSubMenu objects. ```APIDOC ## impl BackstageSubMenu ### Methods * `from_bytes(bytes: &[u8]) -> Result` - Creates a BackstageSubMenu from a byte slice. * `from_str(s: &str) -> Result` - Creates a BackstageSubMenu from a string slice. * `from_reader(reader: R) -> Result` - Creates a BackstageSubMenu from a reader. * `write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error>` - Writes the BackstageSubMenu to an XML writer. * `to_xml_bytes(&self) -> Result, Error>` - Serializes the BackstageSubMenu to XML bytes. * `to_xml(&self) -> Result` - Serializes the BackstageSubMenu to an XML string. ``` -------------------------------- ### Write Start Tag Open Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/common/xml.rs.html Writes the opening part of an XML start tag (e.g., '( writer: &mut W, default_namespace_prefix: &str, tag_prefix: &str, local_name: &str, ) -> std::io::Result<()> { writer.write_all(b"<")?; write_qualified_name(writer, default_namespace_prefix, tag_prefix, local_name) } ``` -------------------------------- ### Sync Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/parts/quick_access_toolbar_customizations_part/struct.QuickAccessToolbarCustomizationsPart.html This snippet shows the implementation of the Sync trait for QuickAccessToolbarCustomizationsPart. ```APIDOC ## impl Sync for QuickAccessToolbarCustomizationsPart ``` -------------------------------- ### SdkChoice Start QName Matching Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_2009_07_customui/enum.BackstageGroupChoice.html Checks if a given byte slice matches the general start qualified name for BackstageGroupChoice. This is part of the SdkChoice trait for XML element identification. ```rust fn matches_start_qname(name: &[u8]) -> bool ``` -------------------------------- ### GuideList Clone Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_presentationml_2006_main/struct.GuideList.html Allows creating a duplicate of a GuideList instance. ```rust fn clone(&self) -> GuideList ``` -------------------------------- ### TryFrom Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_spreadsheetml_2009_9_main/struct.DatastoreItem.html Provides functionality to try converting from another type into DatastoreItem. ```APIDOC ### impl TryFrom for T where U: Into #### type Error = Infallible ### Description The type returned in the event of a conversion error. ### fn try_from(value: U) -> Result>::Error> ### Description Performs the conversion. ### Parameters - `value` (U): The value to convert. ### Returns - `Result>::Error>`: A Result containing the converted value or an error. ``` -------------------------------- ### ShapeGuideList Source: https://docs.rs/ooxmlsdk/latest/src/ooxmlsdk/schemas/schemas_openxmlformats_org_drawingml_2006_main.rs.html A list of shape guides. ```APIDOC ## ShapeGuideList ### Description Contains a list of shape guides, which define adjustable points or values for a shape. ### Fields - **a_gd** (Vec): A list of ShapeGuide elements. ``` -------------------------------- ### type_id Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.StyleLockStylesPart.html Gets the TypeId of the StyleLockStylesPart. ```APIDOC ### impl Any for T #### fn type_id(&self) -> TypeId ``` -------------------------------- ### TryInto Implementation Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_microsoft_com_office_spreadsheetml_2009_9_main/struct.DatastoreItem.html Provides functionality to try converting DatastoreItem into another type. ```APIDOC ### impl TryInto for T where U: TryFrom #### type Error = >::Error ### Description The type returned in the event of a conversion error. ### fn try_into(self) -> Result>::Error> ### Description Performs the conversion. ### Parameters - `self` (T): The value to convert. ### Returns - `Result>::Error>`: A Result containing the converted value or an error. ``` -------------------------------- ### type_id Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.DropDownListSelection.html Gets the TypeId of the DropDownListSelection. ```APIDOC ## impl Any for T ### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. ``` -------------------------------- ### type_id Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.DoNotVerticallyAlignInTextBox.html Gets the TypeId of the value. ```APIDOC ## impl Any for T ### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. Read more ``` -------------------------------- ### StartMargin Implementations Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.StartMargin.html Provides methods for serializing and deserializing StartMargin objects to and from XML, and other utility functions. ```APIDOC ### impl StartMargin #### pub fn from_bytes(bytes: &[u8]) -> Result Deserializes a StartMargin from bytes. #### pub fn from_str(s: &str) -> Result Deserializes a StartMargin from a string. #### pub fn from_reader(reader: R) -> Result Deserializes a StartMargin from a reader. #### pub fn write_xml_to_writer(&self, writer: &mut W) -> Result<(), Error> Writes the StartMargin object to an XML writer. #### pub fn to_xml_bytes(&self) -> Result, Error> Serializes the StartMargin object to XML bytes. #### pub fn to_xml(&self) -> Result Serializes the StartMargin object to an XML string. ``` -------------------------------- ### type_id Source: https://docs.rs/ooxmlsdk/latest/ooxmlsdk/schemas/schemas_openxmlformats_org_wordprocessingml_2006_main/struct.ColumnIndex.html Gets the TypeId of the ColumnIndex. ```APIDOC ## fn type_id(&self) -> TypeId ### Description Gets the `TypeId` of `self`. ```