#[repr(C)]pub struct CharacterData {
pub version: u32,
pub customize: CustomizeData,
pub timestamp: u32,
pub comment: String,
}
Expand description
Represents the several options that make up a character data file (DAT) which is used by the game’s character creation system to save and load presets.
Fields§
§version: u32
The “version” of the game this was created with. Always corresponds to the released expansion at the time, e.g. A Realm Reborn character will have a version of 1. A Shadowbringers character will have a version of 4.
customize: CustomizeData
§timestamp: u32
The timestamp when the preset was created. This is a UTC time in seconds since the Unix epoch.
comment: String
Implementations§
Source§impl CharacterData
impl CharacterData
Sourcepub fn from_existing(buffer: ByteSpan<'_>) -> Option<CharacterData>
pub fn from_existing(buffer: ByteSpan<'_>) -> Option<CharacterData>
Parses existing character data.
Sourcepub fn write_to_buffer(&self) -> Option<ByteBuffer>
pub fn write_to_buffer(&self) -> Option<ByteBuffer>
Write existing character data to a buffer.
Trait Implementations§
Source§impl BinRead for CharacterData
impl BinRead for CharacterData
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments. Read more§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
big-endian byte order. Read more§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
little-endian byte order. Read more§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T
from the reader assuming native-endian byte order. Read more§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader using the given arguments. Read more§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming big-endian byte order, using the
given arguments. Read more§fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming little-endian byte order, using
the given arguments. Read moreSource§impl BinWrite for CharacterData
impl BinWrite for CharacterData
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming big-endian byte order. Read more§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming little-endian byte order. Read moreSource§impl Debug for CharacterData
impl Debug for CharacterData
Source§impl ReadMagic for CharacterData
impl ReadMagic for CharacterData
Auto Trait Implementations§
impl Freeze for CharacterData
impl RefUnwindSafe for CharacterData
impl Send for CharacterData
impl Sync for CharacterData
impl Unpin for CharacterData
impl UnwindSafe for CharacterData
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