Struct gltf::binary::Glb[][src]

pub struct Glb<'a> {
    pub header: Header,
    pub json: Cow<'a, [u8]>,
    pub bin: Option<Cow<'a, [u8]>>,
}

The contents of a .glb file.

Fields

The header section of the .glb file.

The JSON section of the .glb file.

The optional BIN section of the .glb file.

Methods

impl<'a> Glb<'a>
[src]

Writes binary glTF to a writer.

Writes binary glTF to a byte vector.

Splits loaded GLB into its three chunks.

  • Mandatory GLB header.
  • Mandatory JSON chunk.
  • Optional BIN chunk.

Does the loading job for you. Provided buf will be cleared before new data will be written. When error happens, if only header was read, buf will not be mutated, otherwise, buf will be empty.

Trait Implementations

impl<'a> Clone for Glb<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Glb<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Glb<'a>

impl<'a> Sync for Glb<'a>