pub fn copy_from_slice(&self, slice: &[f64]) -> usize {
        let mut len = slice.len();
        let size = self.get_size();
        if size < len {
            len = size;
        }
        unsafe {
            std::ptr::copy(slice.as_ptr(), self.ptr, len);
            len
        }
    }
/// method used to copy data into the table internal buffer
/// from an user slice.
/// # Arguments
/// * `slice` A slice where input.len() elements will be copied.
/// # Returns
/// The number of elements copied into the table
/// # Example
/// ```no_run
/// use csound::Csound;
///
/// let cs = Csound::new();
/// cs.compile_csd("some.csd");
/// cs.start().unwrap();
/// while cs.perform_ksmps() == false {
///     let mut table = cs.get_table(1).unwrap();
///     let mut table_buff = vec![0f64; table.len()];
///     // copy Table::length elements from the table's internal buffer
///     // table.read( table_buff.as_mut_slice() ).unwrap();
///     // Do some stuffs
///     table.copy_from_slice(&table_buff.into_iter().map(|x| x*2.5).collect::<Vec<f64>>().as_mut_slice());
///     // Do some stuffs
/// }
/// ```
method used to copy data into the table internal buffer
from an user slice.
method used to copy data into the table internal buffer from an user slice .
pub fn copy_from_slice(&self, slice: &[f64]) -> usize {
        let mut len = slice.len();
        let size = self.get_size();
        if size < len {
            len = size;
        }
        unsafe {
            std::ptr::copy(slice.as_ptr(), self.ptr, len);
            len
        }
    }
pub fn copy_from_slice ( & self , slice : & [ f64 ] ) -> usize { let mut len = slice . len ( ) ; let size = self . get_size ( ) ; if size < len { len = size ; } unsafe { std :: ptr :: copy ( slice . as_ptr ( ) , self . ptr , len ) ; len } }
method used to copy data into the table internal buffer
from an user slice.
method used to copy data into the table internal buffer from an user slice .
&self
slice
&[f64]
The number of elements copied into the table
The number of elements copied into the table
&self
slice
&[f64]
example
```no_run
use csound::Csound.

let cs = Csound::new();
cs.compile_csd("some.csd");
cs.start().unwrap();
while cs.perform_ksmps() == false {
let mut table = cs.get_table(1).unwrap();
let mut table_buff = vec![0f64; table.len()];
copy Table::length elements from the table's internal buffer
table.read( table_buff.as_mut_slice() ).unwrap();
Do some stuffs
table.copy_from_slice(&table_buff.into_iter().map(|x| x*2.5).collect::>().as_mut_slice());
Do some stuffs
}
```
` ` ` no_run use csound :: Csound . let cs = Csound :: new () ; cs . compile_csd ( " some . csd " ) ; cs . start () . unwrap () ; while cs . perform_ksmps () == false { let mut table = cs . get_table ( 1 ) . unwrap () ; let mut table_buff = vec! [ 0f64 ; table . len () ] ; copy Table :: length elements from the table ' s internal buffer table . read ( table_buff . as_mut_slice () ) . unwrap () ; Do some stuffs table . copy_from_slice ( &table_buff . into_iter () . map ( |x| x * 2 . 5 ) . collect :: > () . as_mut_slice () ) ; Do some stuffs } ` ` `