A vector.
struct Vec<T, Heap = Libc>
where Heap: Allocator,
{
/* private fields */
}| Name | Description |
|---|---|
| buffered | Creates a vector which is backed by borrowed memory. |
| from_raw_parts | Creates a new vector from its raw parts. |
| new | Creates a new allocating vector. |
| with_capacity | Creates a new allocating vector and reserves a certain amount of space for it. |
| with_pool | Creates a new allocating vector with a memory pool. |
| Receiver | Name | Description |
|---|---|---|
&self | available | Returns the number of available but unused slots. |
&self | capacity | Returns the capacity of the vector. |
&mut self | extend | Extends the vector by the elements of an iterator. |
&mut self | pop | Removes an element from the end of the vector. |
&mut self | push | Appends an element to the vector. |
&mut self | push_all | Appends a slice of copyable elements to the vector. |
&mut self | reserve | Reserves memory for additional elements. |
&mut self | set_len | Sets the length of the vector. |
&mut self | shrink_to_fit | Minimizes the amount of used memory. |
&mut self | truncate | Reduces the length of the vector. |
&mut self | try_push | Tries to append a copyable element to the vector. |
&mut self | try_unsafe_push_all | Appends a slice of non-copyable elements to the vector. |
&mut self | unused |
| Name | Description |
|---|---|
| AsCStr | Objects that can be interpreted as |
| AsMutCStr | Objects that can be interpreted as mutable |
| AsMutNoNullStr | Objects that can be borrowed as a mutable |
| AsNoNullStr | Objects that can be borrowed as a |
| BufWrite | Objects that wrap a byte-stream for writing and contain a buffer. |
| Debug | Objects that can be formatted in a "debug" form. |
| Deref | Objects that implement the immutable dereference operator. |
| DerefMut | Objects that implement the mutable dereference operator. |
| Drop | Objects with a destructor. |
| Eq (2 times) | Objects that implement the binary |
| MaybeClone | Objects that can be duplicated. |
| Send | Objects whose ownership can be moved from one thread to another. |
| Sync | Objects that allow immutable access from threads other than their owning thread. |
| ToCStr | Objects that can be transformed into |
| UndefState | Types that are not valid when they contain certain bit patterns. |
| Write | Objects that wrap a byte-stream for writing. |