pub struct TypeRegistry { /* private fields */ }
Expand description
A registry of type details.
Can be populated by passing in to TypeMetadata::metadata
and then used
to output types in other languages.
Implementations§
Source§impl TypeRegistry
impl TypeRegistry
Sourcepub fn register_alias(&mut self, id: TypeId, details: Alias) -> TypeRef
pub fn register_alias(&mut self, id: TypeId, details: Alias) -> TypeRef
Registers an Alias
in the TypeRegistry
Users should use crate::TypeAlias::register_alias
rather than calling this directly.
Sourcepub fn register_struct(&mut self, id: TypeId, details: Struct) -> TypeRef
pub fn register_struct(&mut self, id: TypeId, details: Struct) -> TypeRef
Register a Struct
Users should use crate::TypeMetadata::metadata
rather than calling this directly.
Sourcepub fn register_newtype(&mut self, id: TypeId, details: NewType) -> TypeRef
pub fn register_newtype(&mut self, id: TypeId, details: NewType) -> TypeRef
Register a NewType
Users should use crate::TypeMetadata::metadata
rather than calling this directly.
Sourcepub fn register_enum(&mut self, id: TypeId, details: Enum) -> TypeRef
pub fn register_enum(&mut self, id: TypeId, details: Enum) -> TypeRef
Register an Enum
Users should use crate::TypeMetadata::metadata
rather than calling this directly.
Sourcepub fn register_union(&mut self, id: TypeId, details: Union) -> TypeRef
pub fn register_union(&mut self, id: TypeId, details: Union) -> TypeRef
Register a Uninon
Users should use crate::TypeMetadata::metadata
rather than calling this directly.
Trait Implementations§
Source§impl Default for TypeRegistry
impl Default for TypeRegistry
Source§fn default() -> TypeRegistry
fn default() -> TypeRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeRegistry
impl RefUnwindSafe for TypeRegistry
impl Send for TypeRegistry
impl Sync for TypeRegistry
impl Unpin for TypeRegistry
impl UnwindSafe for TypeRegistry
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