Struct non_std::dependencies::former::dependency::former_runtime::HashMapFormer
[−]pub struct HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Eq + Hash,
HashMap: HashMapLike<K, E> + Default,
ContainerEnd: for<'_> Fn(&mut Former, Option<HashMap>), { /* private fields */ }
Expand description
Class for forming hashmap-like fields.
Implementations
impl<K, E, HashMap, Former, ContainerEnd> HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Eq + Hash,
HashMap: HashMapLike<K, E> + Default,
ContainerEnd: for<'_> Fn(&mut Former, Option<HashMap>),
impl<K, E, HashMap, Former, ContainerEnd> HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Eq + Hash,
HashMap: HashMapLike<K, E> + Default,
ContainerEnd: for<'_> Fn(&mut Former, Option<HashMap>),
pub fn new(
former: Former,
container: Option<HashMap>,
on_end: ContainerEnd
) -> HashMapFormer<K, E, HashMap, Former, ContainerEnd>
pub fn new(
former: Former,
container: Option<HashMap>,
on_end: ContainerEnd
) -> HashMapFormer<K, E, HashMap, Former, ContainerEnd>
Make a new HashMapFormer. It should be called by a former generated for your structure.
pub fn replace(
self,
container: HashMap
) -> HashMapFormer<K, E, HashMap, Former, ContainerEnd>
pub fn replace(
self,
container: HashMap
) -> HashMapFormer<K, E, HashMap, Former, ContainerEnd>
Set the whole container instead of setting each element individually.
pub fn end(self) -> Former
pub fn end(self) -> Former
Return former of your struct moving container there. Should be called after configuring the container.
pub fn insert<K2, E2>(
self,
k: K2,
e: E2
) -> HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K2: Into<K>,
E2: Into<E>,
pub fn insert<K2, E2>(
self,
k: K2,
e: E2
) -> HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K2: Into<K>,
E2: Into<E>,
Inserts a key-value pair into the map. Make a new container if it was not made so far.
Trait Implementations
impl<K, E, HashMap, Former, ContainerEnd> Debug for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Debug + Eq + Hash,
E: Debug,
HashMap: Debug + HashMapLike<K, E> + Default,
Former: Debug,
ContainerEnd: Debug + for<'_> Fn(&mut Former, Option<HashMap>),
impl<K, E, HashMap, Former, ContainerEnd> Debug for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Debug + Eq + Hash,
E: Debug,
HashMap: Debug + HashMapLike<K, E> + Default,
Former: Debug,
ContainerEnd: Debug + for<'_> Fn(&mut Former, Option<HashMap>),
impl<K, E, HashMap, Former, ContainerEnd> Default for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Default + Eq + Hash,
E: Default,
HashMap: Default + HashMapLike<K, E>,
Former: Default,
ContainerEnd: Default + for<'_> Fn(&mut Former, Option<HashMap>),
impl<K, E, HashMap, Former, ContainerEnd> Default for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
K: Default + Eq + Hash,
E: Default,
HashMap: Default + HashMapLike<K, E>,
Former: Default,
ContainerEnd: Default + for<'_> Fn(&mut Former, Option<HashMap>),
fn default() -> HashMapFormer<K, E, HashMap, Former, ContainerEnd>
fn default() -> HashMapFormer<K, E, HashMap, Former, ContainerEnd>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<K, E, HashMap, Former, ContainerEnd> RefUnwindSafe for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
ContainerEnd: RefUnwindSafe,
E: RefUnwindSafe,
Former: RefUnwindSafe,
HashMap: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, E, HashMap, Former, ContainerEnd> Send for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
ContainerEnd: Send,
E: Send,
Former: Send,
HashMap: Send,
K: Send,
impl<K, E, HashMap, Former, ContainerEnd> Sync for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
ContainerEnd: Sync,
E: Sync,
Former: Sync,
HashMap: Sync,
K: Sync,
impl<K, E, HashMap, Former, ContainerEnd> Unpin for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
ContainerEnd: Unpin,
E: Unpin,
Former: Unpin,
HashMap: Unpin,
K: Unpin,
impl<K, E, HashMap, Former, ContainerEnd> UnwindSafe for HashMapFormer<K, E, HashMap, Former, ContainerEnd> where
ContainerEnd: UnwindSafe,
E: UnwindSafe,
Former: UnwindSafe,
HashMap: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
sourcefn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.