From 9e7261a48fc8dd5d0b693be92bbd5c73a1e4f197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 17 Feb 2019 16:29:49 +0100 Subject: [PATCH] feat: Introduce the FromSharedDataCursor trait --- src/shared_data_cursor.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared_data_cursor.rs b/src/shared_data_cursor.rs index c7eeee5c9..785d1b2cf 100644 --- a/src/shared_data_cursor.rs +++ b/src/shared_data_cursor.rs @@ -43,3 +43,9 @@ impl BufRead for SharedDataCursor { self.0.consume(amt) } } + +pub trait FromSharedDataCursor: Sized { + type Err; + + fn from_shared_data_cursor(data: &mut SharedDataCursor) -> Result; +}