Struct rbx_binary::Deserializer
source · [−]pub struct Deserializer<'a> { /* private fields */ }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
sourceimpl<'a> Deserializer<'a>
impl<'a> Deserializer<'a>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Deserializer<'a>
impl<'a> Send for Deserializer<'a>
impl<'a> Sync for Deserializer<'a>
impl<'a> Unpin for Deserializer<'a>
impl<'a> UnwindSafe for Deserializer<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more