pub struct BlfFile<R: BufRead> {
pub reader: R,
pub file_stats: BlfFileStats,
}Fields§
§reader: R§file_stats: BlfFileStatsImplementations§
Source§impl<R: BufRead + Seek> BlfFile<R>
impl<R: BufRead + Seek> BlfFile<R>
Sourcepub fn from_reader(reader: R) -> Result<BlfFile<R>, (Error, R)>
pub fn from_reader(reader: R) -> Result<BlfFile<R>, (Error, R)>
Create a BlfFile from a BufRead
Verifies the magic and reads the BlfFileStats. If it can not be fully read an error is returned with the reader handed back.
If you want an invalid BlfFile, you can use:
use ablf::{BlfFile, BlfFileStats};
let reader = std::io::Cursor::new(&[]);
let blf = BlfFile{reader: reader, file_stats: BlfFileStats::default()};
assert!(!blf.is_valid());Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for BlfFile<R>where
R: Freeze,
impl<R> RefUnwindSafe for BlfFile<R>where
R: RefUnwindSafe,
impl<R> Send for BlfFile<R>where
R: Send,
impl<R> Sync for BlfFile<R>where
R: Sync,
impl<R> Unpin for BlfFile<R>where
R: Unpin,
impl<R> UnwindSafe for BlfFile<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