MoreVec

Trait MoreVec 

Source
pub trait MoreVec<T> {
    // Required methods
    fn push_within_capacity_(&mut self, value: T) -> Result<(), T>;
    fn extend_from_within_within_capacity<R>(
        &mut self,
        src: R,
    ) -> Result<(), ()>
       where R: RangeBounds<usize>,
             T: Clone;
}

Required Methods§

Source

fn push_within_capacity_(&mut self, value: T) -> Result<(), T>

See docs on push_within_capacity in std, which is nightly-only

Source

fn extend_from_within_within_capacity<R>(&mut self, src: R) -> Result<(), ()>
where R: RangeBounds<usize>, T: Clone,

Like extend_from_within but fails if the extension cannot be done within capacity.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> MoreVec<T> for Vec<T>

Source§

fn push_within_capacity_(&mut self, value: T) -> Result<(), T>

Source§

fn extend_from_within_within_capacity<R>(&mut self, src: R) -> Result<(), ()>
where R: RangeBounds<usize>, T: Clone,

Implementors§