pub struct BindingRegistry { /* private fields */ }Expand description
Registry for custom bindings (runtime-defined).
Implementations§
Source§impl BindingRegistry
impl BindingRegistry
pub fn new() -> Self
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a registry pre-populated with static bindings.
Sourcepub fn register(
&mut self,
lower: LayerKind,
upper: LayerKind,
field_name: &'static str,
field_value: u16,
)
pub fn register( &mut self, lower: LayerKind, upper: LayerKind, field_name: &'static str, field_value: u16, )
Register a new binding.
Sourcepub fn find(&self, lower: LayerKind, upper: LayerKind) -> Option<&LayerBinding>
pub fn find(&self, lower: LayerKind, upper: LayerKind) -> Option<&LayerBinding>
Find a binding in this registry.
Sourcepub fn find_from(&self, lower: LayerKind) -> impl Iterator<Item = &LayerBinding>
pub fn find_from(&self, lower: LayerKind) -> impl Iterator<Item = &LayerBinding>
Find all bindings from a lower layer.
Trait Implementations§
Source§impl Clone for BindingRegistry
impl Clone for BindingRegistry
Source§fn clone(&self) -> BindingRegistry
fn clone(&self) -> BindingRegistry
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 BindingRegistry
impl Debug for BindingRegistry
Source§impl Default for BindingRegistry
impl Default for BindingRegistry
Source§fn default() -> BindingRegistry
fn default() -> BindingRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BindingRegistry
impl RefUnwindSafe for BindingRegistry
impl Send for BindingRegistry
impl Sync for BindingRegistry
impl Unpin for BindingRegistry
impl UnsafeUnpin for BindingRegistry
impl UnwindSafe for BindingRegistry
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