From 68ce39ddcf2e19e079483d23df54441166ca3f73 Mon Sep 17 00:00:00 2001 From: Chris Macklin Date: Wed, 7 Aug 2024 15:38:17 -0700 Subject: [PATCH] Make BufHandler trait public. --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index dbb9e34f..e87c85ef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -471,8 +471,10 @@ impl> BufferStateMachine { /// 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 { +pub trait BufHandler { + /// Sort the provided buffer. fn prepare_buf(v: &mut Vec); + /// Process the provided buffer. fn process_buf(&mut self, v: &mut Vec) -> Result<(), Error>; }