Struct rbx_binary::Deserializer[][src]

pub struct Deserializer<'a> { /* fields omitted */ }
Expand description

A configurable deserializer for Roblox binary models and places.

Example

use std::fs::File;
use std::io::BufReader;

use rbx_binary::Deserializer;

let input = BufReader::new(File::open("File.rbxm")?);

let deserializer = Deserializer::new();
let dom = deserializer.deserialize(input)?;

// rbx_binary always returns a DOM with a DataModel at the top level.
// To get to the instances from our file, we need to go one level deeper.

println!("Root instances in file:");
for &referent in dom.root().children() {
    let instance = dom.get_by_ref(referent).unwrap();
    println!("- {}", instance.name);
}

Implementations

Create a new Deserializer with the default settings.

Deserialize a Roblox binary model or place from the given stream using this deserializer.

Trait Implementations

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

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.

Should always be Self

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.