Trait midi2::buffer::BufferTryResize
source · pub trait BufferTryResize {
// Required method
fn try_resize(&mut self, size: usize) -> Result<(), BufferOverflow>;
}Expand description
Buffer types which can resize, but with a chance of failure.
Note: This trait is also implemented by buffers of a fixed size.
In this case try_resize should return Ok whenever
the requested size is less than or equal to the fixed
size of the buffer and an Err otherwise.
For more info see the buffer module docs.