pub type Partial<'a> = ((u8, u8), &'a [u8]);
Expand description
Representation of a nible slice (right aligned). It contains a right aligned padded first byte (first pair element is the number of nibbles (0 to max nb nibble - 1), second pair element is the padded nibble), and a slice over the remaining bytes.
Trait Implementations§
1.56.0 · source§impl<A, B, ExtendA, ExtendB> Extend<(A, B)> for (ExtendA, ExtendB)where
ExtendA: Extend<A>,
ExtendB: Extend<B>,
impl<A, B, ExtendA, ExtendB> Extend<(A, B)> for (ExtendA, ExtendB)where ExtendA: Extend<A>, ExtendB: Extend<B>,
source§fn extend<T>(&mut self, into_iter: T)where
T: IntoIterator<Item = (A, B)>,
fn extend<T>(&mut self, into_iter: T)where T: IntoIterator<Item = (A, B)>,
Allows to extend
a tuple of collections that also implement Extend
.
See also: Iterator::unzip
Examples
let mut tuple = (vec![0], vec![1]);
tuple.extend([(2, 3), (4, 5), (6, 7)]);
assert_eq!(tuple.0, [0, 2, 4, 6]);
assert_eq!(tuple.1, [1, 3, 5, 7]);
// also allows for arbitrarily nested tuples as elements
let mut nested_tuple = (vec![1], (vec![2], vec![3]));
nested_tuple.extend([(4, (5, 6)), (7, (8, 9))]);
let (a, (b, c)) = nested_tuple;
assert_eq!(a, [1, 4, 7]);
assert_eq!(b, [2, 5, 8]);
assert_eq!(c, [3, 6, 9]);
source§fn extend_one(&mut self, item: (A, B))
fn extend_one(&mut self, item: (A, B))
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more