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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,