Struct gltf_json::root::Root[][src]

pub struct Root {
Show 19 fields pub accessors: Vec<Accessor>, pub animations: Vec<Animation>, pub asset: Asset, pub buffers: Vec<Buffer>, pub buffer_views: Vec<View>, pub scene: Option<Index<Scene>>, pub extensions: Option<Root>, pub extras: Extras, pub extensions_used: Vec<String>, pub extensions_required: Vec<String>, pub cameras: Vec<Camera>, pub images: Vec<Image>, pub materials: Vec<Material>, pub meshes: Vec<Mesh>, pub nodes: Vec<Node>, pub samplers: Vec<Sampler>, pub scenes: Vec<Scene>, pub skins: Vec<Skin>, pub textures: Vec<Texture>,
}
Expand description

The root object of a glTF 2.0 asset.

Fields

accessors: Vec<Accessor>

An array of accessors.

animations: Vec<Animation>

An array of keyframe animations.

asset: Asset

Metadata about the glTF asset.

buffers: Vec<Buffer>

An array of buffers.

buffer_views: Vec<View>

An array of buffer views.

scene: Option<Index<Scene>>

The default scene.

extensions: Option<Root>

Extension specific data.

extras: Extras

Optional application specific data.

extensions_used: Vec<String>

Names of glTF extensions used somewhere in this asset.

extensions_required: Vec<String>

Names of glTF extensions required to properly load this asset.

cameras: Vec<Camera>

An array of cameras.

images: Vec<Image>

An array of images.

materials: Vec<Material>

An array of materials.

meshes: Vec<Mesh>

An array of meshes.

nodes: Vec<Node>

An array of nodes.

samplers: Vec<Sampler>

An array of samplers.

scenes: Vec<Scene>

An array of scenes.

skins: Vec<Skin>

An array of skins.

textures: Vec<Texture>

An array of textures.

Implementations

Returns a single item from the root object.

Deserialize from a JSON string slice.

Deserialize from a JSON byte slice.

Deserialize from a stream of JSON.

Serialize as a String of JSON.

Serialize as a pretty-printed String of JSON.

Serialize as a generic JSON value.

Serialize as a JSON byte vector.

Serialize as a pretty-printed JSON byte vector.

Serialize as a JSON byte writertor.

Serialize as a pretty-printed JSON byte writertor.

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

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Retrieves a single value at the given index.

Serialize this value into the given Serde serializer. Read more

Validates the invariants required for the library to function safely.

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

Performs the conversion.

Performs the conversion.

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.