Struct statiki::Array [−][src]
pub struct Array<T, const C: usize> { /* fields omitted */ }
Expand description
Static array with Vec
-like interface
Implementations
Returns pointer to first element in underlying buffer.
Retrieves reference to element without checking boundaries.
Retrieves mutable reference to element without checking boundaries.
Returns mutable slice with current elements
Shortens vector, keeping the first len
elements.
Does nothing if len
is greater or equal to vector length.
Appends element at the end, without checking capacity
Appends element at the end.
Returns Some(T)
on capacity overflow
Unconditionally retrieves element from vector.
Removes element at index
by swapping it with last element, and popping out.
Removes element at index
by swapping it with last element, and popping out.
Note:
Panics when index
is out of bounds
Resizes vector with provided value
If new_len
is greater than len
, the Array
is extended by the difference, with each
additional slot filled with value. If new_len
is less than len
, the Array
is simply
truncated.
Resizes vector with provided value
If new_len
is greater than len
, the Array
is extended by the difference, with each
additional slot filled with value. If new_len
is less than len
, the Array
is simply
truncated.
Note:
Panics if new_len
is greater than CAPACITY
Resizes vector with default values.
If new_len
is greater than len
, the Array
is extended by the difference, with each
additional slot filled with value. If new_len
is less than len
, the Array
is simply
truncated.
Resizes vector with default values.
If new_len
is greater than len
, the Array
is extended by the difference, with each
additional slot filled with value. If new_len
is less than len
, the Array
is simply
truncated.
Note:
Panics if new_len
is greater than CAPACITY
Trait Implementations
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
Attempts to write an entire buffer into this writer. Read more
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Auto Trait Implementations
impl<T, const C: usize> RefUnwindSafe for Array<T, C> where
T: RefUnwindSafe,
impl<T, const C: usize> UnwindSafe for Array<T, C> where
T: UnwindSafe,