pub struct PkMHashmapWrapper { /* private fields */ }Expand description
A wrapper for std::collections::HashMap that implements the PkMethodAccessor trait.
Implementations§
Source§impl PkMHashmapWrapper
impl PkMHashmapWrapper
Sourcepub fn new(
init_vec: Vec<(String, Box<dyn Fn(Option<Vec<u8>>) -> Pin<Box<dyn Pollable>>>)>,
) -> Self
pub fn new( init_vec: Vec<(String, Box<dyn Fn(Option<Vec<u8>>) -> Pin<Box<dyn Pollable>>>)>, ) -> Self
Creates a new PkMHashmapWrapper instance.
§Arguments
init_vec: A vector of tuples, where each tuple contains:String: The method key (name).Box<dyn Fn(Option<Vec<u8>>) -> Pin<Box<dyn Pollable>>: A function that takes optional parameters and returns a pinned, boxedPollablerepresenting the method call.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PkMHashmapWrapper
impl !RefUnwindSafe for PkMHashmapWrapper
impl !Send for PkMHashmapWrapper
impl !Sync for PkMHashmapWrapper
impl Unpin for PkMHashmapWrapper
impl !UnwindSafe for PkMHashmapWrapper
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