[][src]Module xml_dom::convert

Provides safe RefNode conversion functions.

Note that all of the as_{name} functions work as follows.

  • If the node_type corresponds to the correct type, it returns OK.
  • If the node_type does not correspond to the correct type, it returns Error::InvalidState.
  • If the node_type is not implemented it returns Error::NotSupported.

Functions

as_attribute

Safely cast the specified RefNode into a Attribute.

as_attribute_mut

Safely cast the specified RefNode into a mutable Attribute.

as_cdata_section

Safely cast the specified RefNode into a CDataSection.

as_cdata_section_mut

Safely cast the specified RefNode into a mutable CDataSection.

as_comment

Safely cast the specified RefNode into a Comment.

as_comment_mut

Safely cast the specified RefNode into a mutable Comment.

as_document

Safely cast the specified RefNode into a Document.

as_document_fragment

Safely cast the specified RefNode into a DocumentFragment.

as_document_fragment_mut

Safely cast the specified RefNode into a mutable DocumentFragment.

as_document_mut

Safely cast the specified RefNode into a mutable Document.

as_document_type

Safely cast the specified RefNode into a DocumentType.

as_document_type_mut

Safely cast the specified RefNode into a mutable DocumentType.

as_element

Safely cast the specified RefNode into an Element.

as_element_mut

Safely cast the specified RefNode into a mutable Element.

as_element_namespaced

Safely cast the specified RefNode into a Namespaced element.

as_entity

Safely cast the specified RefNode into a Entity.

as_entity_mut

Safely cast the specified RefNode into a mutable Entity.

as_entity_reference

Safely cast the specified RefNode into a EntityReference.

as_entity_reference_mut

Safely cast the specified RefNode into a mutable EntityReference.

as_notation

Safely cast the specified RefNode into a Notation.

as_notation_mut

Safely cast the specified RefNode into a mutable Notation.

as_processing_instruction

Safely cast the specified RefNode into a ProcessingInstruction.

as_processing_instruction_mut

Safely cast the specified RefNode into a mutable ProcessingInstruction.

as_text

Safely cast the specified RefNode into a Text.

as_text_mut

Safely cast the specified RefNode into a mutable Text.

is_attribute

Determines if the specified node is of type NodeType::Attribute.

is_cdata_section

Determines if the specified node is of type NodeType::CDataSection.

is_character_data

Determines if the specified node is a type of CharacterData.

is_comment

Determines if the specified node is of type NodeType::Comment.

is_document

Determines if the specified node is of type NodeType::Attribute.

is_document_fragment

Determines if the specified node is of type NodeType::DocumentFragment.

is_document_type

Determines if the specified node is of type NodeType::DocumentType.

is_element

Determines if the specified node is of type NodeType::Element.

is_element_namespaced

Determines if the specified node is of type NodeType::Element and supports the trait Namespaced.

is_entity

Determines if the specified node is of type NodeType::Entity.

is_entity_reference

Determines if the specified node is of type NodeType::EntityReference.

is_notation

Determines if the specified node is of type NodeType::Notation.

is_processing_instruction

Determines if the specified node is of type NodeType::ProcessingInstruction.

is_text

Determines if the specified node is of type NodeType::Text.

Type Definitions

MutRefAttribute

Type for mutable dynamic trait cast

MutRefCDataSection

Type for mutable dynamic trait cast

MutRefComment

Type for mutable dynamic trait cast

MutRefDocument

Type for mutable dynamic trait cast

MutRefDocumentFragment

Type for mutable dynamic trait cast

MutRefDocumentType

Type for mutable dynamic trait cast

MutRefElement

Type for mutable dynamic trait cast

MutRefEntity

Type for mutable dynamic trait cast

MutRefEntityReference

Type for mutable dynamic trait cast

MutRefNotation

Type for mutable dynamic trait cast

MutRefProcessingInstruction

Type for mutable dynamic trait cast

MutRefText

Type for mutable dynamic trait cast

RefAttribute

Type for dynamic trait cast

RefCDataSection

Type for dynamic trait cast

RefComment

Type for dynamic trait cast

RefDocument

Type for dynamic trait cast

RefDocumentFragment

Type for dynamic trait cast

RefDocumentType

Type for dynamic trait cast

RefElement

Type for dynamic trait cast

RefEntity

Type for dynamic trait cast

RefEntityReference

Type for dynamic trait cast

RefNamespaced

Type for dynamic trait cast

RefNotation

Type for dynamic trait cast

RefProcessingInstruction

Type for dynamic trait cast

RefText

Type for dynamic trait cast