diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-02-13 19:20:26 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-02-13 19:20:26 +0100 |
commit | 91f5ad848e8c89177c41e9ac8dc3d3125a1acdd7 (patch) | |
tree | d41a3eb0e1e9b6a2f1da4831584e00607e2d1b2c /nihav-core/src | |
parent | 26aa3dd30a4b14d566a40d85139076d6fa4e9bb7 (diff) | |
download | nihav-91f5ad848e8c89177c41e9ac8dc3d3125a1acdd7.tar.gz |
core/io: make bitstream reader clone()able
Diffstat (limited to 'nihav-core/src')
-rw-r--r-- | nihav-core/src/io/bitreader.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nihav-core/src/io/bitreader.rs b/nihav-core/src/io/bitreader.rs index 1163326..26b95a6 100644 --- a/nihav-core/src/io/bitreader.rs +++ b/nihav-core/src/io/bitreader.rs @@ -35,7 +35,7 @@ /// Bitstream reading modes. -#[derive(Debug)] +#[derive(Debug,Clone,Copy)] pub enum BitReaderMode { /// The stream is big endian MSB first. BE, @@ -48,7 +48,7 @@ pub enum BitReaderMode { } /// A list specifying general bitstream reading errors. -#[derive(Debug)] +#[derive(Debug,Clone,Copy)] pub enum BitReaderError { /// The reader is at the end of bitstream. BitstreamEnd, @@ -64,7 +64,7 @@ use self::BitReaderError::*; pub type BitReaderResult<T> = Result<T, BitReaderError>; /// Bitstream reader. -#[derive(Debug)] +#[derive(Debug,Clone)] pub struct BitReader<'a> { cache: u64, bits: u8, |