p3_util

Trait VecExt

Source
pub trait VecExt<T> {
    // Required methods
    fn pushed_ref(&mut self, elem: T) -> &T;
    fn pushed_mut(&mut self, elem: T) -> &mut T;
}
Expand description

Convenience methods for Vec.

Required Methods§

Source

fn pushed_ref(&mut self, elem: T) -> &T

Push elem and return a reference to it.

Source

fn pushed_mut(&mut self, elem: T) -> &mut T

Push elem and return a mutable reference to it.

Implementations on Foreign Types§

Source§

impl<T> VecExt<T> for Vec<T>

Source§

fn pushed_ref(&mut self, elem: T) -> &T

Source§

fn pushed_mut(&mut self, elem: T) -> &mut T

Implementors§