pub struct PkHashmapMethod { /* private fields */ }Expand description
A wrapper for std::collections::HashMap that implements the PkMethodAccessor trait.
Implementations§
Source§impl PkHashmapMethod
impl PkHashmapMethod
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 PkHashmapMethod
impl !RefUnwindSafe for PkHashmapMethod
impl !Send for PkHashmapMethod
impl !Sync for PkHashmapMethod
impl Unpin for PkHashmapMethod
impl !UnwindSafe for PkHashmapMethod
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