Skip to main content

ViewMut

Struct ViewMut 

Source
pub struct ViewMut<'a, T, Layout, const L: usize> { /* private fields */ }
Expand description

Mutable typed view of a DSP slice.

Implementations§

Source§

impl<'a, T, Layout, const L: usize> ViewMut<'a, T, Layout, L>

Source

pub fn flat(&self) -> &[T]

Flat underlying storage.

Source

pub fn flat_mut(&mut self) -> &mut [T]

Mutable flat underlying storage.

Source

pub const fn frames(&self) -> usize

Number of frames in the view.

Source

pub fn as_layout<Other>(self) -> ViewMut<'a, T, Other, L>

Reinterpret the same backing storage under another layout marker.

Source§

impl<'a, T, const L: usize> ViewMut<'a, T, FrameMajor, L>

Source

pub fn from_frames(frames: &'a mut [[T; L]]) -> Self

Borrow a mutable conventional frame-major view.

Source

pub fn as_frames(&self) -> &[[T; L]]

Borrow the view as exact frames.

Source

pub fn as_frames_mut(&mut self) -> &mut [[T; L]]

Borrow the view as exact mutable frames.

Source

pub fn frame(&self, i: usize) -> &[T; L]

Borrow one frame.

Source

pub fn frame_mut(&mut self, i: usize) -> &mut [T; L]

Borrow one frame mutably.

Source§

impl<'a, T, const L: usize> ViewMut<'a, T, LaneMajor, L>

Source

pub fn from_flat(flat: &'a mut [T], frames: usize) -> Self

Borrow a mutable lane-major flat view.

frames must satisfy flat.len() == frames * L.

Source

pub fn lane(&self, i: usize) -> &[T]

Borrow one contiguous lane slice.

Source

pub fn lane_mut(&mut self, i: usize) -> &mut [T]

Borrow one contiguous mutable lane slice.

Trait Implementations§

Source§

impl<'a, T: Debug, Layout: Debug, const L: usize> Debug for ViewMut<'a, T, Layout, L>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, X: Copy, C0, C1, S0, S1> SplitViewInplace<ViewMut<'a, X, LaneMajor, 2>, (S0, S1)> for ByLane<(C0, C1)>
where C0: SplitInplace<X, S0>, C1: SplitInplace<X, S1>,

Source§

fn inplace_view(&self, state: &mut (S0, S1), xy: ViewMut<'a, X, LaneMajor, 2>)

Process one typed view in place.
Source§

impl<'a, X: Copy, C, S, const N: usize> SplitViewInplace<ViewMut<'a, X, LaneMajor, N>, [S; N]> for ByLane<[C; N]>
where C: SplitInplace<X, S>,

Source§

fn inplace_view(&self, state: &mut [S; N], xy: ViewMut<'a, X, LaneMajor, N>)

Process one typed view in place.
Source§

impl<'a, X: Copy, C, S, const N: usize> SplitViewInplace<ViewMut<'a, X, LaneMajor, N>, [S; N]> for Lanes<C>
where C: SplitInplace<X, S>,

Source§

fn inplace_view(&self, state: &mut [S; N], xy: ViewMut<'a, X, LaneMajor, N>)

Process one typed view in place.
Source§

impl<'a, 'b, X: Copy, Y, C0, C1, S0, S1> SplitViewProcess<View<'a, X, LaneMajor, 2>, ViewMut<'b, Y, LaneMajor, 2>, (S0, S1)> for ByLane<(C0, C1)>
where C0: SplitProcess<X, Y, S0>, C1: SplitProcess<X, Y, S1>,

Source§

fn process_view( &self, state: &mut (S0, S1), x: View<'a, X, LaneMajor, 2>, y: ViewMut<'b, Y, LaneMajor, 2>, )

Process one typed input view into one typed output view.
Source§

impl<'a, 'b, X: Copy, Y, C, S, const N: usize> SplitViewProcess<View<'a, X, LaneMajor, N>, ViewMut<'b, Y, LaneMajor, N>, [S; N]> for ByLane<[C; N]>
where C: SplitProcess<X, Y, S>,

Source§

fn process_view( &self, state: &mut [S; N], x: View<'a, X, LaneMajor, N>, y: ViewMut<'b, Y, LaneMajor, N>, )

Process one typed input view into one typed output view.
Source§

impl<'a, 'b, X: Copy, Y, C, S, const N: usize> SplitViewProcess<View<'a, X, LaneMajor, N>, ViewMut<'b, Y, LaneMajor, N>, [S; N]> for Lanes<C>
where C: SplitProcess<X, Y, S>,

Source§

fn process_view( &self, state: &mut [S; N], x: View<'a, X, LaneMajor, N>, y: ViewMut<'b, Y, LaneMajor, N>, )

Process one typed input view into one typed output view.

Auto Trait Implementations§

§

impl<'a, T, Layout, const L: usize> !UnwindSafe for ViewMut<'a, T, Layout, L>

§

impl<'a, T, Layout, const L: usize> Freeze for ViewMut<'a, T, Layout, L>

§

impl<'a, T, Layout, const L: usize> RefUnwindSafe for ViewMut<'a, T, Layout, L>
where Layout: RefUnwindSafe, T: RefUnwindSafe,

§

impl<'a, T, Layout, const L: usize> Send for ViewMut<'a, T, Layout, L>
where Layout: Send, T: Send,

§

impl<'a, T, Layout, const L: usize> Sync for ViewMut<'a, T, Layout, L>
where Layout: Sync, T: Sync,

§

impl<'a, T, Layout, const L: usize> Unpin for ViewMut<'a, T, Layout, L>
where Layout: Unpin,

§

impl<'a, T, Layout, const L: usize> UnsafeUnpin for ViewMut<'a, T, Layout, L>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, X, S, T, const L: usize> SplitViewInplace<ViewMut<'a, X, FrameMajor, L>, S> for T
where X: Copy, T: SplitInplace<X, S>, S: ?Sized,

Source§

fn inplace_view(&self, state: &mut S, xy: ViewMut<'a, X, FrameMajor, L>)

Process one typed view in place.
Source§

impl<'a, 'b, X, Y, S, T, const L: usize> SplitViewProcess<View<'a, X, FrameMajor, L>, ViewMut<'b, Y, FrameMajor, L>, S> for T
where X: Copy, T: SplitProcess<X, Y, S>, S: ?Sized,

Source§

fn process_view( &self, state: &mut S, x: View<'a, X, FrameMajor, L>, y: ViewMut<'b, Y, FrameMajor, L>, )

Process one typed input view into one typed output view.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.