Struct xxlib::types::TypeClass[][src]

pub struct TypeClass<const LEN: usize> { /* fields omitted */ }

用于存储类型和TypeId的映射 实现根据Typeid 创建对象

Implementations

impl<const LEN: usize> TypeClass<LEN>[src]

pub const fn new() -> Self[src]

pub fn register(&self, typeid: u16, cfn: CreateFn)[src]

注册TypeId

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

根据typeid 创建对象

Trait Implementations

impl<const LEN: usize> Send for TypeClass<LEN>[src]

impl<const LEN: usize> Sync for TypeClass<LEN>[src]

Auto Trait Implementations

impl<const LEN: usize> NotU8 for TypeClass<LEN>

impl<const LEN: usize> !RefUnwindSafe for TypeClass<LEN>

impl<const LEN: usize> Unpin for TypeClass<LEN>

impl<const LEN: usize> UnwindSafe for TypeClass<LEN>

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.