Skip to content

Commit

Permalink
Make BufHandler trait public. (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
macklin-10x authored Aug 7, 2024
1 parent fe6deba commit 60412ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,10 @@ impl<T, H: BufHandler<T>> BufferStateMachine<T, H> {
/// Two-part handler for a buffer needing processing.
/// `prepare_buf` is generic and needs no state. Used for sorting.
/// `process_buf` needs exclusive access to the handler, so can do IO.
trait BufHandler<T> {
pub trait BufHandler<T> {
/// Sort the provided buffer.
fn prepare_buf(v: &mut Vec<T>);
/// Process the provided buffer.
fn process_buf(&mut self, v: &mut Vec<T>) -> Result<(), Error>;
}

Expand Down

0 comments on commit 60412ad

Please sign in to comment.