From 9b9a48435187a9b6070cb5a3f734d4b5a5e60a05 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Sun, 23 Jun 2019 09:20:34 -0400 Subject: [PATCH] maraiah: add documentation for SeekBackToStart's methods --- maraiah/file.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maraiah/file.rs b/maraiah/file.rs index 50b49ff..d9ee3f0 100644 --- a/maraiah/file.rs +++ b/maraiah/file.rs @@ -38,10 +38,14 @@ impl std::ops::DerefMut for SeekBackToStart impl SeekBackToStart where T: Seek { + /// Creates a new `SeekBackToStart` object. pub fn new(sc: T) -> Self {Self{sc, fl: true}} + /// Sets the seek-back flag. pub fn set_seek(&mut self, fl: bool) {self.fl = fl;} - pub fn get_seek(&self) -> bool {self.fl} + + /// Returns the seek-back flag. + pub fn get_seek(&self) -> bool {self.fl} } /// Seeks back to the starting position of the inner object when losing scope,