pub struct LinearTypeRegistry { /* private fields */ }Expand description
Registry for linear type definitions.
Implementations§
Source§impl LinearTypeRegistry
impl LinearTypeRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Create a registry with common types.
Sourcepub fn register(&mut self, ty: LinearType)
pub fn register(&mut self, ty: LinearType)
Register a linear type.
Sourcepub fn get(&self, name: &str) -> Option<&LinearType>
pub fn get(&self, name: &str) -> Option<&LinearType>
Get a type by name.
Sourcepub fn type_names(&self) -> Vec<&str>
pub fn type_names(&self) -> Vec<&str>
Get all type names.
Trait Implementations§
Source§impl Clone for LinearTypeRegistry
impl Clone for LinearTypeRegistry
Source§fn clone(&self) -> LinearTypeRegistry
fn clone(&self) -> LinearTypeRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearTypeRegistry
impl Debug for LinearTypeRegistry
Source§impl Default for LinearTypeRegistry
impl Default for LinearTypeRegistry
Source§fn default() -> LinearTypeRegistry
fn default() -> LinearTypeRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LinearTypeRegistry
impl RefUnwindSafe for LinearTypeRegistry
impl Send for LinearTypeRegistry
impl Sync for LinearTypeRegistry
impl Unpin for LinearTypeRegistry
impl UnwindSafe for LinearTypeRegistry
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