Struct non_std::dependencies::former::dependency::former_runtime::VectorFormer
[−]pub struct VectorFormer<E, Vector, Former, ContainerEnd> where
Vector: VectorLike<E> + Debug + PartialEq<Vector> + Default,
ContainerEnd: for<'_> Fn(&mut Former, Option<Vector>), { /* private fields */ }
Expand description
Class for forming vector-like fields.
Implementations
impl<E, Vector, Former, ContainerEnd> VectorFormer<E, Vector, Former, ContainerEnd> where
Vector: VectorLike<E> + Debug + PartialEq<Vector> + Default,
ContainerEnd: for<'_> Fn(&mut Former, Option<Vector>),
impl<E, Vector, Former, ContainerEnd> VectorFormer<E, Vector, Former, ContainerEnd> where
Vector: VectorLike<E> + Debug + PartialEq<Vector> + Default,
ContainerEnd: for<'_> Fn(&mut Former, Option<Vector>),
pub fn new(
former: Former,
container: Option<Vector>,
on_end: ContainerEnd
) -> VectorFormer<E, Vector, Former, ContainerEnd>
pub fn new(
former: Former,
container: Option<Vector>,
on_end: ContainerEnd
) -> VectorFormer<E, Vector, Former, ContainerEnd>
Make a new VectorFormer. It should be called by a former generated for your structure.
pub fn replace(
self,
vector: Vector
) -> VectorFormer<E, Vector, Former, ContainerEnd>
pub fn replace(
self,
vector: Vector
) -> VectorFormer<E, Vector, 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 push<E2>(self, e: E2) -> VectorFormer<E, Vector, Former, ContainerEnd> where
E2: Into<E>,
pub fn push<E2>(self, e: E2) -> VectorFormer<E, Vector, Former, ContainerEnd> where
E2: Into<E>,
Appends an element to the back of a container. Make a new container if it was not made so far.
Trait Implementations
impl<E, Vector, Former, ContainerEnd> Debug for VectorFormer<E, Vector, Former, ContainerEnd> where
E: Debug,
Vector: Debug + VectorLike<E> + PartialEq<Vector> + Default,
Former: Debug,
ContainerEnd: Debug + for<'_> Fn(&mut Former, Option<Vector>),
impl<E, Vector, Former, ContainerEnd> Debug for VectorFormer<E, Vector, Former, ContainerEnd> where
E: Debug,
Vector: Debug + VectorLike<E> + PartialEq<Vector> + Default,
Former: Debug,
ContainerEnd: Debug + for<'_> Fn(&mut Former, Option<Vector>),
impl<E, Vector, Former, ContainerEnd> Default for VectorFormer<E, Vector, Former, ContainerEnd> where
E: Default,
Vector: Default + VectorLike<E> + Debug + PartialEq<Vector>,
Former: Default,
ContainerEnd: Default + for<'_> Fn(&mut Former, Option<Vector>),
impl<E, Vector, Former, ContainerEnd> Default for VectorFormer<E, Vector, Former, ContainerEnd> where
E: Default,
Vector: Default + VectorLike<E> + Debug + PartialEq<Vector>,
Former: Default,
ContainerEnd: Default + for<'_> Fn(&mut Former, Option<Vector>),
fn default() -> VectorFormer<E, Vector, Former, ContainerEnd>
fn default() -> VectorFormer<E, Vector, Former, ContainerEnd>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<E, Vector, Former, ContainerEnd> RefUnwindSafe for VectorFormer<E, Vector, Former, ContainerEnd> where
ContainerEnd: RefUnwindSafe,
E: RefUnwindSafe,
Former: RefUnwindSafe,
Vector: RefUnwindSafe,
impl<E, Vector, Former, ContainerEnd> Send for VectorFormer<E, Vector, Former, ContainerEnd> where
ContainerEnd: Send,
E: Send,
Former: Send,
Vector: Send,
impl<E, Vector, Former, ContainerEnd> Sync for VectorFormer<E, Vector, Former, ContainerEnd> where
ContainerEnd: Sync,
E: Sync,
Former: Sync,
Vector: Sync,
impl<E, Vector, Former, ContainerEnd> Unpin for VectorFormer<E, Vector, Former, ContainerEnd> where
ContainerEnd: Unpin,
E: Unpin,
Former: Unpin,
Vector: Unpin,
impl<E, Vector, Former, ContainerEnd> UnwindSafe for VectorFormer<E, Vector, Former, ContainerEnd> where
ContainerEnd: UnwindSafe,
E: UnwindSafe,
Former: UnwindSafe,
Vector: 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.