pub unsafe trait Array {
type Item: Sized;
// Required methods
fn as_slice(&self) -> &[Self::Item];
fn as_mut_slice(&mut self) -> &mut [Self::Item];
}
Expand description
Trait for static arrays.
§Safety
This trait is declared as unsafe to signify that it should only be
implemented for static arrays ([T; x]
for some size x). Implementing it
for other types can result in undefined behavior and instability.
Required Associated Types§
Required Methods§
Sourcefn as_mut_slice(&mut self) -> &mut [Self::Item]
fn as_mut_slice(&mut self) -> &mut [Self::Item]
Returns a mutable slice of the entire array.