maraiah: add documentation for SeekBackToStart's methods

master
an 2019-06-23 09:20:34 -04:00
parent 2dd4762c2e
commit 9b9a484351
1 changed files with 5 additions and 1 deletions

View File

@ -38,10 +38,14 @@ impl<T> std::ops::DerefMut for SeekBackToStart<T>
impl<T> SeekBackToStart<T>
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,