Struct savefile::Serializer [−][src]
pub struct Serializer<'a> { pub version: u32, // some fields omitted }
Expand description
Object to which serialized data is to be written.
This is basically just a wrapped std::io::Write
object
and a file protocol version number.
Fields
version: u32
The version of the data structures in memory which are being serialized.
Implementations
Writes a binary bool to the dyn Write
Writes a binary u8 to the dyn Write
Writes a binary i8 to the dyn Write
Writes a binary little endian u16 to the dyn Write
Writes a binary little endian i16 to the dyn Write
Writes a binary little endian u32 to the dyn Write
Writes a binary little endian i32 to the dyn Write
Writes a binary little endian f32 to the dyn Write
Writes a binary little endian f64 to the dyn Write
Writes a binary little endian u64 to the dyn Write
Writes a binary little endian i64 to the dyn Write
Writes a binary little endian usize as u64 to the dyn Write
Writes a binary little endian isize as i64 to the dyn Write
Writes a binary u8 array to the dyn Write
Writes as a string as 64 bit length + utf8 data
Writes a binary u8 array to the dyn Write. Synonym of write_buf.
Creata a new serializer. Don’t use this function directly, use the crate::save function instead.
pub fn save_noschema<T: WithSchema + Serialize>(
writer: &mut dyn Write,
version: u32,
data: &T
) -> Result<(), SavefileError>
[src]
pub fn save_noschema<T: WithSchema + Serialize>(
writer: &mut dyn Write,
version: u32,
data: &T
) -> Result<(), SavefileError>
[src]Creata a new serializer. Don’t use this function directly, use the crate::save_noschema function instead.
Create a Serializer. Don’t use this method directly, use the crate::save function instead.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Serializer<'a>
impl<'a> !Send for Serializer<'a>
impl<'a> !Sync for Serializer<'a>
impl<'a> Unpin for Serializer<'a>
impl<'a> !UnwindSafe for Serializer<'a>