Type Alias FieldSlice

Source
pub type FieldSlice<'a, P> = FieldBuffer<P, FieldSliceData<'a, P>>;
Expand description

Alias for a field buffer over a borrowed slice.

Aliased Type§

pub struct FieldSlice<'a, P> { /* private fields */ }

Implementations§

Source§

impl<'a, P: PackedField> FieldSlice<'a, P>

Source

pub fn from_slice(log_len: usize, slice: &'a [P]) -> Result<Self, Error>

Create a new FieldSlice from a slice of packed values.

§Throws
  • IncorrectArgumentLength if the number of field elements does not fit the slice.len() exactly.

Trait Implementations§

Source§

impl<'a, P: PackedField, Data: Deref<Target = [P]>> From<&'a FieldBuffer<P, Data>> for FieldSlice<'a, P>

Source§

fn from(buffer: &'a FieldBuffer<P, Data>) -> Self

Converts to this type from the input type.