pub struct Document {
    pub asset: Asset,
    pub library: Vec<LibraryElement>,
    pub scene: Option<Scene>,
    pub extra: Vec<Extra>,
}
Expand description

A Collada document. Represents the <COLLADA> root node.

This is the main entry point for parsing.

Fields

asset: Asset

Metadata about the origin of the document

library: Vec<LibraryElement>

The main content, organized into a list of “libraries”.

scene: Option<Scene>

The actual scene being described, which references / instantiates objects in the libraries.

extra: Vec<Extra>

Provides arbitrary additional information about this element.

Implementations

Run a function over all elements of type T in the document.

Run a function over all elements of type T in the document.

Construct an ID -> element mapping for node type T. This can be used to look up ID references.

Convenience function, to return the main VisualScene referred to in the scene field.

Construct an ID -> element mapping for every node type T. This can be used to look up ID references.

This function will initialize every type. See LocalMaps::default and LocalMaps::set for a builder API which allows you to pick which types you are interested in, or LocalMaps::new and LocalMaps::unset to exclude certain types.

Returns an iterator over Library<T> elements.

Returns an iterator over all elements of type T.

Constructs a new empty Document.

Constructs a new empty Document with creation date set to the current date/time.

Add a new library element with the given items.

Constructs a Document from a file.

Constructs a Document from any BufRead reader. Use BufReader to construct a BufRead if you only have a Read instance.

Constructs a Document from a quick_xml::Reader.

Write the document to a writer.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.