pub struct CallbackClosureMatcher<const CB_NAME_MAX_LENGTH: usize> { /* private fields */ }
Expand description
Helps the callback macro expansion to perform callback name matching more efficiently. The current implementation hashes by callback name length, but in principle further optimizations are possible.
Implementations§
Source§impl<const CB_NAME_MAX_LENGTH: usize> CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
impl<const CB_NAME_MAX_LENGTH: usize> CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
pub fn new<M: ManagedTypeApi + ErrorApi>( callback_name: &ManagedBuffer<M>, ) -> Self
pub fn new_from_unmanaged(callback_name: &[u8]) -> Self
pub fn matches_empty(&self) -> bool
pub fn name_matches(&self, name_match: &[u8]) -> bool
Auto Trait Implementations§
impl<const CB_NAME_MAX_LENGTH: usize> Freeze for CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
impl<const CB_NAME_MAX_LENGTH: usize> RefUnwindSafe for CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
impl<const CB_NAME_MAX_LENGTH: usize> Send for CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
impl<const CB_NAME_MAX_LENGTH: usize> Sync for CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
impl<const CB_NAME_MAX_LENGTH: usize> Unpin for CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
impl<const CB_NAME_MAX_LENGTH: usize> UnwindSafe for CallbackClosureMatcher<CB_NAME_MAX_LENGTH>
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