pub struct EnterpriseFieldRegistry { /* private fields */ }Expand description
Registry for storing user-defined enterprise field definitions
This registry is used internally by parsers to look up custom field metadata during parsing.
Implementations§
Source§impl EnterpriseFieldRegistry
impl EnterpriseFieldRegistry
Sourcepub fn register(&mut self, def: EnterpriseFieldDef)
pub fn register(&mut self, def: EnterpriseFieldDef)
Register a single enterprise field definition
If a field with the same enterprise number and field number already exists, it will be replaced.
Sourcepub fn register_many(
&mut self,
defs: impl IntoIterator<Item = EnterpriseFieldDef>,
)
pub fn register_many( &mut self, defs: impl IntoIterator<Item = EnterpriseFieldDef>, )
Register multiple enterprise field definitions at once
Sourcepub fn get(
&self,
enterprise_number: u32,
field_number: u16,
) -> Option<&EnterpriseFieldDef>
pub fn get( &self, enterprise_number: u32, field_number: u16, ) -> Option<&EnterpriseFieldDef>
Look up a field definition by enterprise number and field number
Trait Implementations§
Source§impl Clone for EnterpriseFieldRegistry
impl Clone for EnterpriseFieldRegistry
Source§fn clone(&self) -> EnterpriseFieldRegistry
fn clone(&self) -> EnterpriseFieldRegistry
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 EnterpriseFieldRegistry
impl Debug for EnterpriseFieldRegistry
Source§impl Default for EnterpriseFieldRegistry
impl Default for EnterpriseFieldRegistry
Source§fn default() -> EnterpriseFieldRegistry
fn default() -> EnterpriseFieldRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EnterpriseFieldRegistry
impl RefUnwindSafe for EnterpriseFieldRegistry
impl Send for EnterpriseFieldRegistry
impl Sync for EnterpriseFieldRegistry
impl Unpin for EnterpriseFieldRegistry
impl UnwindSafe for EnterpriseFieldRegistry
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