Struct xxlib::manager::ObjectManager[][src]

pub struct ObjectManager { /* fields omitted */ }

PKG 序列化 反序列化 的实现

Implementations

impl ObjectManager[src]

pub fn new() -> Self[src]

pub fn register<T: Default + ISerde + 'static>()[src]

注册 struct 和 Typeid 映射

pub fn create(typeid: u16) -> Option<SharedPtr<dyn ISerde>>[src]

根据 Typeid 返回 SharedPtr 如果没有注册 返回 None

pub fn write_to<T: ISerde>(
    &self,
    data: &mut Data,
    value: &SharedPtr<T>
) -> Result<()>
[src]

写入入口函数

pub fn write_<T: IWriteInner>(&self, data: &mut Data, value: &T) -> Result<()>[src]

生成物结构内部写入

pub fn read_ptr(&self, dr: &mut DataReader<'_>) -> Result<SharedPtr<dyn ISerde>>[src]

读SharedPtr

pub fn read_from<T: ISerde + 'static>(
    &self,
    dr: &mut DataReader<'_>,
    ptr: &SharedPtr<T>
) -> Result<()>
[src]

pub fn read_<T: IReadInner>(
    &self,
    data: &mut DataReader<'_>,
    v: &mut T
) -> Result<()>
[src]

Trait Implementations

impl Default for ObjectManager[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.