pub struct Instance<T: Instantiate> {
    pub sid: Option<String>,
    pub url: UrlRef<T>,
    pub name: Option<String>,
    pub data: T::Data,
    pub extra: Vec<Extra>,
}
Expand description

Instantiates a COLLADA material resource, possibly applying transformations or effects to the object.

The data field depends on the type of object being instantiated. Most types use () for this field but some types have additional data:

Additionally, some instance nodes are even more different and have their own types:

Fields

sid: Option<String>

A text string containing the scoped identifier of this element. This value must be unique within the scope of the parent element.

url: UrlRef<T>

The URL of the location of the T element to instantiate. Can refer to a local instance or external reference.

name: Option<String>

The text string name of this element.

data: T::Data

The additional data associated with the instantiation, if any.

extra: Vec<Extra>

Provides arbitrary additional information about this element.

Implementations

Get the list of InstanceMaterials bound in this Instance<Geometry>.

Look up an InstanceMaterial by symbol name.

Construct a new instance pointing at the given Url (which should reference an object of type T).

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

Converts to this type from the input type.

Converts to this type from the input type.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.