pub fn enqueue_slice(&mut self, data: &[T]) -> usize
            where T: Copy {
        let (size_1, data) = self.enqueue_many_with(|buf| {
            let size = cmp::min(buf.len(), data.len());
            buf[..size].copy_from_slice(&data[..size]);
            (size, &data[size..])
        });
        let (size_2, ()) = self.enqueue_many_with(|buf| {
            let size = cmp::min(buf.len(), data.len());
            buf[..size].copy_from_slice(&data[..size]);
            (size, ())
        });
        size_1 + size_2
    }
/// Enqueue as many elements from the given slice into the buffer as possible,
/// and return the amount of elements that could fit.
// #[must_use]
Enqueue as many elements from the given slice into the buffer as possible,
and return the amount of elements that could fit.
Enqueue as many elements from the given slice into the buffer as possible and return the amount of elements that could fit .
pub fn enqueue_slice(&mut self, data: &[T]) -> usize
            where T: Copy {
        let (size_1, data) = self.enqueue_many_with(|buf| {
            let size = cmp::min(buf.len(), data.len());
            buf[..size].copy_from_slice(&data[..size]);
            (size, &data[size..])
        });
        let (size_2, ()) = self.enqueue_many_with(|buf| {
            let size = cmp::min(buf.len(), data.len());
            buf[..size].copy_from_slice(&data[..size]);
            (size, ())
        });
        size_1 + size_2
    }
pub fn enqueue_slice ( & mut self , data : & [ T ] ) -> usize where T : Copy { let ( size_1 , data ) = self . enqueue_many_with ( | buf | { let size = cmp :: min ( buf . len ( ) , data . len ( ) ) ; buf [ .. size ] . copy_from_slice ( & data [ .. size ] ) ; ( size , & data [ size .. ] ) } ) ; let ( size_2 , ( ) ) = self . enqueue_many_with ( | buf | { let size = cmp :: min ( buf . len ( ) , data . len ( ) ) ; buf [ .. size ] . copy_from_slice ( & data [ .. size ] ) ; ( size , ( ) ) } ) ; size_1 + size_2 }
Enqueue as many elements from the given slice into the buffer as possible,
and return the amount of elements that could fit.
Enqueue as many elements from the given slice into the buffer as possible and return the amount of elements that could fit .
&mut self
data
&[T]
&mut self
data
&[T]
[must_use]
None