[][src]Struct oscen::utils::RingBuffer

pub struct RingBuffer<T> {
    pub read_pos: Real,
    pub write_pos: usize,
    // some fields omitted
}

Variable length circular buffer.

Fields

read_pos: Realwrite_pos: usize

Implementations

impl<T> RingBuffer<T> where
    T: Clone + Default
[src]

pub fn new(read_pos: Real, write_pos: usize) -> Self[src]

pub fn push(&mut self, v: T)[src]

pub fn len(&self) -> usize[src]

pub fn resize(&mut self, size: usize)[src]

pub fn set_read_pos(&mut self, rp: Real)[src]

pub fn set_write_pos(&mut self, wp: usize)[src]

impl<T> RingBuffer<T> where
    T: Copy + Default
[src]

pub fn get(&self) -> T[src]

pub fn get_offset(&self, offset: i32) -> T[src]

impl RingBuffer<Real>[src]

pub fn get_linear(&self) -> Real[src]

pub fn get_cubic(&self) -> Real[src]

Hermite cubic polynomial interpolation.

Trait Implementations

impl<T: Clone> Clone for RingBuffer<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for RingBuffer<T> where
    T: RefUnwindSafe

impl<T> Send for RingBuffer<T> where
    T: Send

impl<T> Sync for RingBuffer<T> where
    T: Sync

impl<T> Unpin for RingBuffer<T> where
    T: Unpin

impl<T> UnwindSafe for RingBuffer<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,