pub struct Registry { /* private fields */ }Expand description
Names resolve to indices once, in the reader, so a call site costs an array index and not a hash lookup.
Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Registry
pub fn op(self, def: OpDef) -> Registry
pub fn ty(self, name: &'static str, decode: Decoder) -> Registry
pub fn lookup(&self, name: &str) -> Option<u16>
pub fn get(&self, idx: u16) -> &OpDef
pub fn decoder(&self, type_name: &str) -> Option<Decoder>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnwindSafe for Registry
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