Type SliceRepr

type SliceRepr = vec::raw::SliceRepr

Type VecRepr

type VecRepr = vec::raw::VecRepr

Function push

unsafe fn push<T>(v: &mut @[T], initval: T)

Pushes a new value onto this vector.

Function reserve

unsafe fn reserve<T>(v: &mut @[T], n: uint)

Reserves capacity for exactly n elements in the given vector.

If the capacity for v is already equal to or greater than the requested capacity, then no action is taken.

Arguments

Function reserve_at_least

unsafe fn reserve_at_least<T>(v: &mut @[T], n: uint)

Reserves capacity for at least n elements in the given vector.

This function will over-allocate in order to amortize the allocation costs in scenarios where the caller may need to repeatedly reserve additional space.

If the capacity for v is already equal to or greater than the requested capacity, then no action is taken.

Arguments

Function set_len

unsafe fn set_len<T>(v: @[T], new_len: uint)

Sets the length of a vector

This will explicitly set the size of the vector, without actually modifing its buffers, so it is up to the caller to ensure that the vector is actually the specified size.