pub struct Reader<R: Read> { /* private fields */ }
Expand description
An SBET reader.
Implementations§
Source§impl<R: Read> Reader<R>
impl<R: Read> Reader<R>
Sourcepub fn read_point(&mut self) -> Result<Option<Point>, Error>
pub fn read_point(&mut self) -> Result<Option<Point>, Error>
Reads a point from this reader.
Returns none if the file is at its end when this reader starts reading. We have to do it this way since sbet files don’t have a point count.
§Examples
use pos::sbet::Reader;
let mut reader = Reader::from_path("data/2-points.sbet").unwrap();
let point = reader.read_point().unwrap().unwrap();
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for Reader<R>where
R: Freeze,
impl<R> RefUnwindSafe for Reader<R>where
R: RefUnwindSafe,
impl<R> Send for Reader<R>where
R: Send,
impl<R> Sync for Reader<R>where
R: Sync,
impl<R> Unpin for Reader<R>where
R: Unpin,
impl<R> UnwindSafe for Reader<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more