//! Deprecated, see [`binary::bits`] #![deprecated(since = "0.4.2", note = "Replaced with `binary::bits`")] use crate::binary; use crate::error::{ErrorConvert, ParseError}; use crate::lib::std::ops::{AddAssign, Shl, Shr}; use crate::stream::{AsBytes, Stream, StreamIsPartial, ToUsize}; use crate::{IResult, Parser}; /// Deprecated, replaced with [`binary::bits::bits`] #[deprecated(since = "0.4.2", note = "Replaced with `binary::bits::bits`")] #[inline(always)] pub fn bits(parser: P) -> impl Parser where E1: ParseError<(I, usize)> + ErrorConvert, E2: ParseError, I: Stream, P: Parser<(I, usize), O, E1>, { binary::bits::bits(parser) } /// Deprecated, replaced with [`binary::bits::bytes`] #[deprecated(since = "0.4.2", note = "Replaced with `binary::bits::bytes`")] #[inline(always)] pub fn bytes(parser: P) -> impl Parser<(I, usize), O, E2> where E1: ParseError + ErrorConvert, E2: ParseError<(I, usize)>, I: Stream, P: Parser, { binary::bits::bytes(parser) } /// Deprecated, replaced with [`binary::bits::take`] #[deprecated(since = "0.4.2", note = "Replaced with `binary::bits::take`")] #[inline(always)] pub fn take>(count: C) -> impl Parser<(I, usize), O, E> where I: Stream + AsBytes + StreamIsPartial, C: ToUsize, O: From + AddAssign + Shl + Shr, { binary::bits::take(count) } /// Deprecated, replaced with [`binary::bits::tag`] #[deprecated(since = "0.4.2", note = "Replaced with `binary::bits::tag`")] #[inline(always)] pub fn tag>( pattern: O, count: C, ) -> impl Parser<(I, usize), O, E> where I: Stream + AsBytes + StreamIsPartial, C: ToUsize, O: From + AddAssign + Shl + Shr + PartialEq, { binary::bits::tag(pattern, count) } /// Deprecated, replaced with [`binary::bits::bool`] #[deprecated(since = "0.4.2", note = "Replaced with `binary::bits::bool`")] #[inline(always)] pub fn bool>(input: (I, usize)) -> IResult<(I, usize), bool, E> where I: Stream + AsBytes + StreamIsPartial, { binary::bits::bool(input) }