Struct gltf_json::root::Root [−][src]
pub struct Root {
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: 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>,
}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: 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.
Methods
impl Root[src]
impl Rootpub fn get<T>(&self, index: &Index<T>) -> Option<&T> where
Self: Get<T>, [src]
pub fn get<T>(&self, index: &Index<T>) -> Option<&T> where
Self: Get<T>, Returns a single item from the root object.
pub fn from_str(str_: &str) -> Result<Self, Error>[src]
pub fn from_str(str_: &str) -> Result<Self, Error>Deserialize from a JSON string slice.
pub fn from_slice(slice: &[u8]) -> Result<Self, Error>[src]
pub fn from_slice(slice: &[u8]) -> Result<Self, Error>Deserialize from a JSON byte slice.
pub fn from_reader<R>(reader: R) -> Result<Self, Error> where
R: Read, [src]
pub fn from_reader<R>(reader: R) -> Result<Self, Error> where
R: Read, Deserialize from a stream of JSON.
pub fn to_string(&self) -> Result<String, Error>[src]
pub fn to_string(&self) -> Result<String, Error>Serialize as a String of JSON.
pub fn to_string_pretty(&self) -> Result<String, Error>[src]
pub fn to_string_pretty(&self) -> Result<String, Error>Serialize as a pretty-printed String of JSON.
pub fn to_value(&self) -> Result<Value, Error>[src]
pub fn to_value(&self) -> Result<Value, Error>Serialize as a generic JSON value.
pub fn to_vec(&self) -> Result<Vec<u8>, Error>[src]
pub fn to_vec(&self) -> Result<Vec<u8>, Error>Serialize as a JSON byte vector.
pub fn to_vec_pretty(&self) -> Result<Vec<u8>, Error>[src]
pub fn to_vec_pretty(&self) -> Result<Vec<u8>, Error>Serialize as a pretty-printed JSON byte vector.
pub fn to_writer<W>(&self, writer: W) -> Result<(), Error> where
W: Write, [src]
pub fn to_writer<W>(&self, writer: W) -> Result<(), Error> where
W: Write, Serialize as a JSON byte writertor.
pub fn to_writer_pretty<W>(&self, writer: W) -> Result<(), Error> where
W: Write, [src]
pub fn to_writer_pretty<W>(&self, writer: W) -> Result<(), Error> where
W: Write, Serialize as a pretty-printed JSON byte writertor.
Trait Implementations
impl Clone for Root[src]
impl Clone for Rootfn clone(&self) -> Root[src]
fn clone(&self) -> RootReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Root[src]
impl Debug for Rootfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for Root[src]
impl Default for Rootimpl Validate for Root[src]
impl Validate for Rootfn validate_minimally<P, R>(&self, _root: &Root, _path: P, _report: &mut R) where
P: Fn() -> Path,
R: FnMut(&Fn() -> Path, Error), [src]
fn validate_minimally<P, R>(&self, _root: &Root, _path: P, _report: &mut R) where
P: Fn() -> Path,
R: FnMut(&Fn() -> Path, Error), Validates only the invariants required for the library to function safely.
fn validate_completely<P, R>(&self, _root: &Root, _path: P, _report: &mut R) where
P: Fn() -> Path,
R: FnMut(&Fn() -> Path, Error), [src]
fn validate_completely<P, R>(&self, _root: &Root, _path: P, _report: &mut R) where
P: Fn() -> Path,
R: FnMut(&Fn() -> Path, Error), Validates the data against the glTF 2.0 specification. Read more
impl<'a> Get<Accessor> for Root[src]
impl<'a> Get<Accessor> for Rootfn get(&self, index: &Index<Accessor>) -> Option<&Accessor>[src]
fn get(&self, index: &Index<Accessor>) -> Option<&Accessor>Retrieves a single value at the given index.
impl<'a> Get<Animation> for Root[src]
impl<'a> Get<Animation> for Rootfn get(&self, index: &Index<Animation>) -> Option<&Animation>[src]
fn get(&self, index: &Index<Animation>) -> Option<&Animation>Retrieves a single value at the given index.
impl<'a> Get<Buffer> for Root[src]
impl<'a> Get<Buffer> for Rootfn get(&self, index: &Index<Buffer>) -> Option<&Buffer>[src]
fn get(&self, index: &Index<Buffer>) -> Option<&Buffer>Retrieves a single value at the given index.
impl<'a> Get<View> for Root[src]
impl<'a> Get<View> for Rootfn get(&self, index: &Index<View>) -> Option<&View>[src]
fn get(&self, index: &Index<View>) -> Option<&View>Retrieves a single value at the given index.
impl<'a> Get<Camera> for Root[src]
impl<'a> Get<Camera> for Rootfn get(&self, index: &Index<Camera>) -> Option<&Camera>[src]
fn get(&self, index: &Index<Camera>) -> Option<&Camera>Retrieves a single value at the given index.
impl<'a> Get<Image> for Root[src]
impl<'a> Get<Image> for Rootfn get(&self, index: &Index<Image>) -> Option<&Image>[src]
fn get(&self, index: &Index<Image>) -> Option<&Image>Retrieves a single value at the given index.
impl<'a> Get<Material> for Root[src]
impl<'a> Get<Material> for Rootfn get(&self, index: &Index<Material>) -> Option<&Material>[src]
fn get(&self, index: &Index<Material>) -> Option<&Material>Retrieves a single value at the given index.
impl<'a> Get<Mesh> for Root[src]
impl<'a> Get<Mesh> for Rootfn get(&self, index: &Index<Mesh>) -> Option<&Mesh>[src]
fn get(&self, index: &Index<Mesh>) -> Option<&Mesh>Retrieves a single value at the given index.
impl<'a> Get<Node> for Root[src]
impl<'a> Get<Node> for Rootfn get(&self, index: &Index<Node>) -> Option<&Node>[src]
fn get(&self, index: &Index<Node>) -> Option<&Node>Retrieves a single value at the given index.
impl<'a> Get<Sampler> for Root[src]
impl<'a> Get<Sampler> for Rootfn get(&self, index: &Index<Sampler>) -> Option<&Sampler>[src]
fn get(&self, index: &Index<Sampler>) -> Option<&Sampler>Retrieves a single value at the given index.
impl<'a> Get<Scene> for Root[src]
impl<'a> Get<Scene> for Rootfn get(&self, index: &Index<Scene>) -> Option<&Scene>[src]
fn get(&self, index: &Index<Scene>) -> Option<&Scene>Retrieves a single value at the given index.
impl<'a> Get<Skin> for Root[src]
impl<'a> Get<Skin> for Rootfn get(&self, index: &Index<Skin>) -> Option<&Skin>[src]
fn get(&self, index: &Index<Skin>) -> Option<&Skin>Retrieves a single value at the given index.
impl<'a> Get<Texture> for Root[src]
impl<'a> Get<Texture> for Root