Struct industrial_io::buffer::Buffer
source · pub struct Buffer { /* private fields */ }
Expand description
An Industrial I/O input or output buffer
Implementations
sourceimpl Buffer
impl Buffer
sourcepub fn refill(&mut self) -> Result<usize>
pub fn refill(&mut self) -> Result<usize>
Fetch more samples from the hardware
This is only valid for input buffers
sourcepub fn push(&mut self) -> Result<usize>
pub fn push(&mut self) -> Result<usize>
Send the samples to the hardware.
This is only valid for output buffers
sourcepub fn push_partial(&mut self, n: usize) -> Result<usize>
pub fn push_partial(&mut self, n: usize) -> Result<usize>
Send a given number of samples to the hardware.
n
The number of samples to send
This is only valid for output buffers
sourcepub fn channel_iter<T>(&self, chan: &Channel) -> IntoIter<T> ⓘ
pub fn channel_iter<T>(&self, chan: &Channel) -> IntoIter<T> ⓘ
Gets an iterator for the data from a channel.
Auto Trait Implementations
impl RefUnwindSafe for Buffer
impl !Send for Buffer
impl !Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more