pub trait VecFromOtherTypeSlice<T: Sized>: Sized {
    fn vec_from_other_type_slice(slice: &[T]) -> Vec<Self>;
}
Expand description

Converts a slice of one type of value to a Vec of another type.

Required Methods

Implementations on Foreign Types

Converts a slice of one type of value to a Vec of the same type.

In this case, it just converts the slice to a Vec the usual way.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of value to a Vec of the same type.

In this case, it just converts the slice to a Vec the usual way.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of value to a Vec of the same type.

In this case, it just converts the slice to a Vec the usual way.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of value to a Vec of the same type.

In this case, it just converts the slice to a Vec the usual way.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of value to a Vec of the same type.

In this case, it just converts the slice to a Vec the usual way.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of value to a Vec of the same type.

In this case, it just converts the slice to a Vec the usual way.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a smaller unsigned type.

Each value of the input slice will be broken up into several values in the output Vec.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = 2^{V-W}n$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of one type of unsigned integer to a Vec of a larger unsigned type.

Adjacent chunks of values in the input slice will be joined into values of the output Vec. If the last few elements of the input slice don’t make up a full chunk, the most-significant bits of the last output value are set to 0.

Let $V$ be the the width of the input type and $W$ the width of the output type.

$f((x_k)_ {k=0}^{n-1}) = (y_k)_ {k=0}^{m-1}$, where

$$ \sum_{j=0}^{n-1}2^{jV}x_j = \sum_{j=0}^{m-1}2^{jW}y_j, $$

$y_j < 2^W$ for all $j$, and $m = \lceil n / 2^{W-V} \rceil$.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

Examples

See here.

Converts a slice of u32s to a Vec of usizes.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

See here.

Converts a slice of u64s to a Vec of usizes.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

See here.

Converts a slice of usizes to a Vec of u32s.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

See here.

Converts a slice of usizes to a Vec of u64s.

Worst-case complexity

$T(n) = O(n)$

$M(n) = O(n)$

where $T$ is time, $M$ is additional memory, and $n$ is xs.len().

See here.

Implementors