HashSetFormer

Struct HashSetFormer 

Source
pub struct HashSetFormer<E, HashSet, Former, ContainerEnd>
where E: Eq + Hash, HashSet: HashSetLike<E> + Default, ContainerEnd: Fn(&mut Former, Option<HashSet>),
{ /* private fields */ }
Expand description

Class for forming hashset-like fields.

Implementations§

Source§

impl<E, HashSet, Former, ContainerEnd> HashSetFormer<E, HashSet, Former, ContainerEnd>
where E: Eq + Hash, HashSet: HashSetLike<E> + Default, ContainerEnd: Fn(&mut Former, Option<HashSet>),

Source

pub fn new( former: Former, container: Option<HashSet>, on_end: ContainerEnd, ) -> HashSetFormer<E, HashSet, Former, ContainerEnd>

Make a new HashSetFormer. It should be called by a former generated for your structure.

Source

pub fn replace( self, container: HashSet, ) -> HashSetFormer<E, HashSet, Former, ContainerEnd>

Set the whole container instead of setting each element individually.

Source

pub fn end(self) -> Former

Return former of your struct moving container there. Should be called after configuring the container.

Source

pub fn insert<E2>( self, e: E2, ) -> HashSetFormer<E, HashSet, Former, ContainerEnd>
where E2: Into<E>,

Inserts a key-value pair into the map. Make a new container if it was not made so far.

Trait Implementations§

Source§

impl<E, HashSet, Former, ContainerEnd> Debug for HashSetFormer<E, HashSet, Former, ContainerEnd>
where E: Debug + Eq + Hash, HashSet: Debug + HashSetLike<E> + Default, Former: Debug, ContainerEnd: Debug + Fn(&mut Former, Option<HashSet>),

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<E, HashSet, Former, ContainerEnd> Default for HashSetFormer<E, HashSet, Former, ContainerEnd>
where E: Default + Eq + Hash, HashSet: Default + HashSetLike<E>, Former: Default, ContainerEnd: Default + Fn(&mut Former, Option<HashSet>),

Source§

fn default() -> HashSetFormer<E, HashSet, Former, ContainerEnd>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<E, HashSet, Former, ContainerEnd> Freeze for HashSetFormer<E, HashSet, Former, ContainerEnd>
where Former: Freeze, ContainerEnd: Freeze, HashSet: Freeze,

§

impl<E, HashSet, Former, ContainerEnd> RefUnwindSafe for HashSetFormer<E, HashSet, Former, ContainerEnd>
where Former: RefUnwindSafe, ContainerEnd: RefUnwindSafe, HashSet: RefUnwindSafe, E: RefUnwindSafe,

§

impl<E, HashSet, Former, ContainerEnd> Send for HashSetFormer<E, HashSet, Former, ContainerEnd>
where Former: Send, ContainerEnd: Send, HashSet: Send, E: Send,

§

impl<E, HashSet, Former, ContainerEnd> Sync for HashSetFormer<E, HashSet, Former, ContainerEnd>
where Former: Sync, ContainerEnd: Sync, HashSet: Sync, E: Sync,

§

impl<E, HashSet, Former, ContainerEnd> Unpin for HashSetFormer<E, HashSet, Former, ContainerEnd>
where Former: Unpin, ContainerEnd: Unpin, HashSet: Unpin, E: Unpin,

§

impl<E, HashSet, Former, ContainerEnd> UnwindSafe for HashSetFormer<E, HashSet, Former, ContainerEnd>
where Former: UnwindSafe, ContainerEnd: UnwindSafe, HashSet: UnwindSafe, E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoResult<T> for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Target, Original> VectorizedInto<Target> for Original
where Target: VectorizedFrom<Original>,

Source§

fn vectorized_into(self) -> Target

Performs the conversion.