Type Alias gear_lazy_pages::PageSizes
source · pub type PageSizes = [NonZeroU32; 2];
Implementations§
source§impl<T, const N: usize> [T; N]
impl<T, const N: usize> [T; N]
1.55.0 · sourcepub fn map<F, U>(self, f: F) -> [U; N]where
F: FnMut(T) -> U,
pub fn map<F, U>(self, f: F) -> [U; N]where F: FnMut(T) -> U,
Returns an array of the same size as self
, with function f
applied to each element
in order.
If you don’t necessarily need a new fixed-size array, consider using
Iterator::map
instead.
Note on performance and stack usage
Unfortunately, usages of this method are currently not always optimized as well as they could be. This mainly concerns large arrays, as mapping over small arrays seem to be optimized just fine. Also note that in debug mode (i.e. without any optimizations), this method can use a lot of stack space (a few times the size of the array or more).
Therefore, in performance-critical code, try to avoid using this method
on large arrays or check the emitted code. Also try to avoid chained
maps (e.g. arr.map(...).map(...)
).
In many cases, you can instead use Iterator::map
by calling .iter()
or .into_iter()
on your array. [T; N]::map
is only necessary if you
really need a new array of the same size as the result. Rust’s lazy
iterators tend to get optimized very well.
Examples
let x = [1, 2, 3];
let y = x.map(|v| v + 1);
assert_eq!(y, [2, 3, 4]);
let x = [1, 2, 3];
let mut temp = 0;
let y = x.map(|v| { temp += 1; v * temp });
assert_eq!(y, [1, 4, 9]);
let x = ["Ferris", "Bueller's", "Day", "Off"];
let y = x.map(|v| v.len());
assert_eq!(y, [6, 9, 3, 3]);
sourcepub fn try_map<F, R>(
self,
f: F
) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryTypewhere
F: FnMut(T) -> R,
R: Try,
<R as Try>::Residual: Residual<[<R as Try>::Output; N]>,
🔬This is a nightly-only experimental API. (array_try_map
)
pub fn try_map<F, R>( self, f: F ) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryTypewhere F: FnMut(T) -> R, R: Try, <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,
array_try_map
)A fallible function f
applied to each element on array self
in order to
return an array the same size as self
or the first error encountered.
The return type of this function depends on the return type of the closure.
If you return Result<T, E>
from the closure, you’ll get a Result<[T; N], E>
.
If you return Option<T>
from the closure, you’ll get an Option<[T; N]>
.
Examples
#![feature(array_try_map)]
let a = ["1", "2", "3"];
let b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);
assert_eq!(b, [2, 3, 4]);
let a = ["1", "2a", "3"];
let b = a.try_map(|v| v.parse::<u32>());
assert!(b.is_err());
use std::num::NonZeroU32;
let z = [1, 2, 0, 3, 4];
assert_eq!(z.try_map(NonZeroU32::new), None);
let a = [1, 2, 3];
let b = a.try_map(NonZeroU32::new);
let c = b.map(|x| x.map(NonZeroU32::get));
assert_eq!(c, Some(a));
1.57.0 (const: 1.57.0) · sourcepub const fn as_slice(&self) -> &[T]
pub const fn as_slice(&self) -> &[T]
Returns a slice containing the entire array. Equivalent to &s[..]
.
1.57.0 · sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Returns a mutable slice containing the entire array. Equivalent to
&mut s[..]
.
sourcepub fn each_ref(&self) -> [&T; N]
🔬This is a nightly-only experimental API. (array_methods
)
pub fn each_ref(&self) -> [&T; N]
array_methods
)Borrows each element and returns an array of references with the same
size as self
.
Example
#![feature(array_methods)]
let floats = [3.1, 2.7, -1.0];
let float_refs: [&f64; 3] = floats.each_ref();
assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
This method is particularly useful if combined with other methods, like
map
. This way, you can avoid moving the original
array if its elements are not Copy
.
#![feature(array_methods)]
let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()];
let is_ascii = strings.each_ref().map(|s| s.is_ascii());
assert_eq!(is_ascii, [true, false, true]);
// We can still access the original array: it has not been moved.
assert_eq!(strings.len(), 3);
sourcepub fn each_mut(&mut self) -> [&mut T; N]
🔬This is a nightly-only experimental API. (array_methods
)
pub fn each_mut(&mut self) -> [&mut T; N]
array_methods
)Borrows each element mutably and returns an array of mutable references
with the same size as self
.
Example
#![feature(array_methods)]
let mut floats = [3.1, 2.7, -1.0];
let float_refs: [&mut f64; 3] = floats.each_mut();
*float_refs[0] = 0.0;
assert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);
assert_eq!(floats, [0.0, 2.7, -1.0]);
sourcepub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])
🔬This is a nightly-only experimental API. (split_array
)
pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])
split_array
)Divides one array reference into two at an index.
The first will contain all indices from [0, M)
(excluding
the index M
itself) and the second will contain all
indices from [M, N)
(excluding the index N
itself).
Panics
Panics if M > N
.
Examples
#![feature(split_array)]
let v = [1, 2, 3, 4, 5, 6];
{
let (left, right) = v.split_array_ref::<0>();
assert_eq!(left, &[]);
assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
}
{
let (left, right) = v.split_array_ref::<2>();
assert_eq!(left, &[1, 2]);
assert_eq!(right, &[3, 4, 5, 6]);
}
{
let (left, right) = v.split_array_ref::<6>();
assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
assert_eq!(right, &[]);
}
sourcepub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])
🔬This is a nightly-only experimental API. (split_array
)
pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])
split_array
)Divides one mutable array reference into two at an index.
The first will contain all indices from [0, M)
(excluding
the index M
itself) and the second will contain all
indices from [M, N)
(excluding the index N
itself).
Panics
Panics if M > N
.
Examples
#![feature(split_array)]
let mut v = [1, 0, 3, 0, 5, 6];
let (left, right) = v.split_array_mut::<2>();
assert_eq!(left, &mut [1, 0][..]);
assert_eq!(right, &mut [3, 0, 5, 6]);
left[1] = 2;
right[1] = 4;
assert_eq!(v, [1, 2, 3, 4, 5, 6]);
sourcepub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])
🔬This is a nightly-only experimental API. (split_array
)
pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])
split_array
)Divides one array reference into two at an index from the end.
The first will contain all indices from [0, N - M)
(excluding
the index N - M
itself) and the second will contain all
indices from [N - M, N)
(excluding the index N
itself).
Panics
Panics if M > N
.
Examples
#![feature(split_array)]
let v = [1, 2, 3, 4, 5, 6];
{
let (left, right) = v.rsplit_array_ref::<0>();
assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
assert_eq!(right, &[]);
}
{
let (left, right) = v.rsplit_array_ref::<2>();
assert_eq!(left, &[1, 2, 3, 4]);
assert_eq!(right, &[5, 6]);
}
{
let (left, right) = v.rsplit_array_ref::<6>();
assert_eq!(left, &[]);
assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
}
sourcepub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])
🔬This is a nightly-only experimental API. (split_array
)
pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])
split_array
)Divides one mutable array reference into two at an index from the end.
The first will contain all indices from [0, N - M)
(excluding
the index N - M
itself) and the second will contain all
indices from [N - M, N)
(excluding the index N
itself).
Panics
Panics if M > N
.
Examples
#![feature(split_array)]
let mut v = [1, 0, 3, 0, 5, 6];
let (left, right) = v.rsplit_array_mut::<4>();
assert_eq!(left, &mut [1, 0]);
assert_eq!(right, &mut [3, 0, 5, 6][..]);
left[1] = 2;
right[1] = 4;
assert_eq!(v, [1, 2, 3, 4, 5, 6]);
Trait Implementations§
§impl<T, const N: usize> Archive for [T; N]where
T: Archive,
impl<T, const N: usize> Archive for [T; N]where T: Archive,
§impl<T> Array for [T; 0]where
T: Default,
impl<T> Array for [T; 0]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 1]where
T: Default,
impl<T> Array for [T; 1]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 10]where
T: Default,
impl<T> Array for [T; 10]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 1024]where
T: Default,
impl<T> Array for [T; 1024]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 11]where
T: Default,
impl<T> Array for [T; 11]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 12]where
T: Default,
impl<T> Array for [T; 12]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 128]where
T: Default,
impl<T> Array for [T; 128]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 13]where
T: Default,
impl<T> Array for [T; 13]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 14]where
T: Default,
impl<T> Array for [T; 14]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 15]where
T: Default,
impl<T> Array for [T; 15]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 16]where
T: Default,
impl<T> Array for [T; 16]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
source§impl<T> Array for [T; 16384]
impl<T> Array for [T; 16384]
§impl<T> Array for [T; 17]where
T: Default,
impl<T> Array for [T; 17]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 18]where
T: Default,
impl<T> Array for [T; 18]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 19]where
T: Default,
impl<T> Array for [T; 19]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 2]where
T: Default,
impl<T> Array for [T; 2]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 20]where
T: Default,
impl<T> Array for [T; 20]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 2048]where
T: Default,
impl<T> Array for [T; 2048]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 21]where
T: Default,
impl<T> Array for [T; 21]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 22]where
T: Default,
impl<T> Array for [T; 22]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 23]where
T: Default,
impl<T> Array for [T; 23]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 24]where
T: Default,
impl<T> Array for [T; 24]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 25]where
T: Default,
impl<T> Array for [T; 25]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 256]where
T: Default,
impl<T> Array for [T; 256]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 26]where
T: Default,
impl<T> Array for [T; 26]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 27]where
T: Default,
impl<T> Array for [T; 27]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 28]where
T: Default,
impl<T> Array for [T; 28]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 29]where
T: Default,
impl<T> Array for [T; 29]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 3]where
T: Default,
impl<T> Array for [T; 3]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 30]where
T: Default,
impl<T> Array for [T; 30]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 31]where
T: Default,
impl<T> Array for [T; 31]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 32]where
T: Default,
impl<T> Array for [T; 32]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
source§impl<T> Array for [T; 32768]
impl<T> Array for [T; 32768]
§impl<T> Array for [T; 33]where
T: Default,
impl<T> Array for [T; 33]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 4]where
T: Default,
impl<T> Array for [T; 4]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 4096]where
T: Default,
impl<T> Array for [T; 4096]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 5]where
T: Default,
impl<T> Array for [T; 5]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 512]where
T: Default,
impl<T> Array for [T; 512]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 6]where
T: Default,
impl<T> Array for [T; 6]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 64]where
T: Default,
impl<T> Array for [T; 64]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
source§impl<T> Array for [T; 65536]
impl<T> Array for [T; 65536]
§impl<T> Array for [T; 7]where
T: Default,
impl<T> Array for [T; 7]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 8]where
T: Default,
impl<T> Array for [T; 8]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
§impl<T> Array for [T; 9]where
T: Default,
impl<T> Array for [T; 9]where T: Default,
§fn as_slice_mut(&mut self) -> &mut [T]
fn as_slice_mut(&mut self) -> &mut [T]
source§impl<T> AsByteSliceMut for [T; 0]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 0]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 1]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 1]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 10]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 10]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 1024]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 1024]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 11]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 11]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 12]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 12]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 128]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 128]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 13]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 13]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 14]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 14]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 15]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 15]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 16]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 16]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 17]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 17]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 18]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 18]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 19]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 19]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 2]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 2]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 20]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 20]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 2048]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 2048]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 21]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 21]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 22]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 22]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 23]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 23]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 24]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 24]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 25]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 25]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 256]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 256]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 26]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 26]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 27]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 27]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 28]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 28]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 29]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 29]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 3]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 3]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 30]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 30]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 31]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 31]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 32]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 32]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 4]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 4]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 4096]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 4096]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 5]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 5]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 512]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 512]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 6]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 6]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 64]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 64]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 7]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 7]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 8]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 8]where [T]: AsByteSliceMut,
source§impl<T> AsByteSliceMut for [T; 9]where
[T]: AsByteSliceMut,
impl<T> AsByteSliceMut for [T; 9]where [T]: AsByteSliceMut,
§impl<T, const N: usize> BitView for [T; N]where
T: BitStore,
impl<T, const N: usize> BitView for [T; N]where T: BitStore,
Note that overly-large arrays may cause the conversions to fail.
§fn view_bits<O>(&self) -> &BitSlice<T, O> ⓘwhere
O: BitOrder,
fn view_bits<O>(&self) -> &BitSlice<T, O> ⓘwhere O: BitOrder,
§fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>where O: BitOrder,
§fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere O: BitOrder,
§fn try_view_bits_mut<O>(
&mut self
) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
fn try_view_bits_mut<O>( &mut self ) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where O: BitOrder,
§impl<T, const N: usize> BitViewSized for [T; N]where
T: BitStore,
impl<T, const N: usize> BitViewSized for [T; N]where T: BitStore,
§fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]
fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]
§fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]
fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]
§fn into_bitarray<O>(self) -> BitArray<Self, O>where
O: BitOrder,
fn into_bitarray<O>(self) -> BitArray<Self, O>where O: BitOrder,
self
in a BitArray
.