pub struct VecBuilder { /* private fields */ }Implementations§
Source§impl VecBuilder
impl VecBuilder
Sourcepub const fn capacity(&mut self, capacity: usize) -> &mut Self
pub const fn capacity(&mut self, capacity: usize) -> &mut Self
The built Vec will have the minimum capacity required for capacity elements.
The capacity can be greater due to the alignment to the page size.
Sourcepub const fn growth_strategy(
&mut self,
growth_strategy: GrowthStrategy,
) -> &mut Self
pub const fn growth_strategy( &mut self, growth_strategy: GrowthStrategy, ) -> &mut Self
The built Vec will have the given growth_strategy.
§Panics
Panics if growth_strategy isn’t valid per the documentation of GrowthStrategy.
Sourcepub fn try_build<T>(&self) -> Result<Vec<T>, TryReserveError>
pub fn try_build<T>(&self) -> Result<Vec<T>, TryReserveError>
Trait Implementations§
Source§impl Clone for VecBuilder
impl Clone for VecBuilder
Source§fn clone(&self) -> VecBuilder
fn clone(&self) -> VecBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VecBuilder
impl Debug for VecBuilder
impl Copy for VecBuilder
Auto Trait Implementations§
impl Freeze for VecBuilder
impl RefUnwindSafe for VecBuilder
impl Send for VecBuilder
impl Sync for VecBuilder
impl Unpin for VecBuilder
impl UnwindSafe for VecBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more