[][src]Struct csound::BufferPtr

pub struct BufferPtr<'a, T> { /* fields omitted */ }

Csound buffer pointer representation. This struct is build up to manipulate directly csound's buffers.

Methods

impl<'a, T> BufferPtr<'a, T>[src]

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

Returns

The buffer length

pub fn copy_to_slice(&self, slice: &mut [f64]) -> usize[src]

This method is used to copy data from the csound's buffer into another slice.

Arguments

  • slice A mutable slice where the data will be copy

Returns

The number of elements copied into the slice.

pub fn as_slice(&self) -> &[f64][src]

Returns

A slice to the buffer internal data

impl<'a> BufferPtr<'a, Writable>[src]

pub fn as_mut_slice(&mut self) -> &mut [f64][src]

Returns

This buffer pointer as a mutable slice.

pub fn copy_from_slice(&self, slice: &[f64]) -> usize[src]

method used to copy data into this buffer

Arguments

  • slice A slice with samples to copy

Returns

The number of elements copied into the csound's buffer.

Trait Implementations

impl<'a> AsMut<[f64]> for BufferPtr<'a, Writable>[src]

impl<'a, T> AsRef<[f64]> for BufferPtr<'a, T>[src]

impl<'a> DerefMut for BufferPtr<'a, Writable>[src]

impl<'a, T> Deref for BufferPtr<'a, T>[src]

type Target = [f64]

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a, T> !Send for BufferPtr<'a, T>

impl<'a, T> !Sync for BufferPtr<'a, T>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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<T> Borrow for T where
    T: ?Sized
[src]

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

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