mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 16:44:06 +02:00
impl BitRead for Box
This commit is contained in:
parent
296b2e1092
commit
ddada03f34
1 changed files with 7 additions and 0 deletions
|
|
@ -238,6 +238,13 @@ impl<E: Endianness, T: BitRead<E>> BitRead<E> for Arc<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<E: Endianness, T: BitRead<E>> BitRead<E> for Box<T> {
|
||||||
|
#[inline]
|
||||||
|
fn read(stream: &mut BitStream<E>) -> Result<Self> {
|
||||||
|
Ok(Box::new(T::read(stream)?))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Trait for types that can be read from a stream, requiring the size to be configured
|
/// Trait for types that can be read from a stream, requiring the size to be configured
|
||||||
///
|
///
|
||||||
/// The meaning of the set sized depends on the type being read (e.g, number of bits for integers,
|
/// The meaning of the set sized depends on the type being read (e.g, number of bits for integers,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue