Struct stm32l432xx_hal::dma::CircBuffer
source · pub struct CircBuffer<BUFFER, CHANNEL>where
BUFFER: 'static,{ /* private fields */ }
Implementations§
source§impl<B> CircBuffer<B, C1>
impl<B> CircBuffer<B, C1>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read
source§impl<B> CircBuffer<B, C2>
impl<B> CircBuffer<B, C2>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read
source§impl<B> CircBuffer<B, C3>
impl<B> CircBuffer<B, C3>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read
source§impl<B> CircBuffer<B, C4>
impl<B> CircBuffer<B, C4>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read
source§impl<B> CircBuffer<B, C5>
impl<B> CircBuffer<B, C5>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read
source§impl<B> CircBuffer<B, C6>
impl<B> CircBuffer<B, C6>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read
source§impl<B> CircBuffer<B, C7>
impl<B> CircBuffer<B, C7>
sourcepub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
pub fn partial_peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> Result<(usize, R), ()>,
B: Unsize<[T]>,
Return the partial contents of the buffer half being written
sourcepub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
pub fn peek<R, F, T>(&mut self, f: F) -> Result<R, Error>where
F: FnOnce(&[T], Half) -> R,
B: Unsize<[T]>,
Peeks into the readable half of the buffer Returns the result of the closure
sourcepub fn readable_half(&mut self) -> Result<Half, Error>
pub fn readable_half(&mut self) -> Result<Half, Error>
Returns the Half
of the buffer that can be read