From 60412ad19a3358bf5e33a77e7f38b77f25b27992 Mon Sep 17 00:00:00 2001 From: Chris Macklin Date: Wed, 7 Aug 2024 15:41:32 -0700 Subject: [PATCH] Make BufHandler trait public. (#53) --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index b88cba77..1bd1b53f 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>; }