pub struct BinarySerializer { /* private fields */ }Implementations§
Source§impl BinarySerializer
impl BinarySerializer
pub fn new(format: BinaryFormat) -> Self
pub fn json() -> Self
pub fn messagepack() -> Self
pub fn bincode() -> Self
pub fn serialize_message(&self, message: &Message) -> Result<Bytes>
pub fn deserialize_message(&self, data: &[u8]) -> Result<Message>
pub fn serialize_snapshot(&self, snapshot: &WorldSnapshot) -> Result<Bytes>
pub fn deserialize_snapshot(&self, data: &[u8]) -> Result<WorldSnapshot>
pub fn serialize_delta(&self, delta: &Delta) -> Result<Bytes>
pub fn deserialize_delta(&self, data: &[u8]) -> Result<Delta>
pub fn serialize_component( &self, component: &SerializedComponent, ) -> Result<Bytes>
pub fn deserialize_component(&self, data: &[u8]) -> Result<SerializedComponent>
pub fn get_format(&self) -> BinaryFormat
Auto Trait Implementations§
impl Freeze for BinarySerializer
impl RefUnwindSafe for BinarySerializer
impl Send for BinarySerializer
impl Sync for BinarySerializer
impl Unpin for BinarySerializer
impl UnwindSafe for BinarySerializer
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