Struct rbx_binary::Serializer
source · #[non_exhaustive]pub struct Serializer<'db> { /* private fields */ }
Expand description
A configurable serializer for Roblox binary models and places.
Example
use std::fs::File;
use std::io::BufWriter;
use rbx_binary::Serializer;
use rbx_dom_weak::{InstanceBuilder, WeakDom};
let dom = WeakDom::new(InstanceBuilder::new("Folder"));
let output = BufWriter::new(File::create("PlainFolder.rbxm")?);
let serializer = Serializer::new();
serializer.serialize(output, &dom, &[dom.root_ref()])?;
Configuration
A custom ReflectionDatabase
can be specified via
reflection_database
.
Implementations§
source§impl<'db> Serializer<'db>
impl<'db> Serializer<'db>
sourcepub fn reflection_database(self, database: &'db ReflectionDatabase<'db>) -> Self
pub fn reflection_database(self, database: &'db ReflectionDatabase<'db>) -> Self
Sets what reflection database for the serializer to use.
Trait Implementations§
Auto Trait Implementations§
impl<'db> RefUnwindSafe for Serializer<'db>
impl<'db> Send for Serializer<'db>
impl<'db> Sync for Serializer<'db>
impl<'db> Unpin for Serializer<'db>
impl<'db> UnwindSafe for Serializer<'db>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more