Skip to content

Commit

Permalink
mark internal types as private
Browse files Browse the repository at this point in the history
they are not really useful to construct manually
  • Loading branch information
Geal committed Oct 21, 2023
1 parent 63def4e commit ed9ca5b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/number/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ pub enum Endianness {
Native,
}

/// creates a big endian unsigned integer parser
///
/// * `bound`: the number of bytes that will be read
/// * `Uint`: the output type
#[inline]
fn be_uint<I, Uint, E: ParseError<I>>(bound: usize) -> impl Parser<I, Output = Uint, Error = E>
where
Expand All @@ -42,8 +46,8 @@ where
}
}

/// todo
pub struct BeUint<Uint, E> {
/// Big endian unsigned integer parser
struct BeUint<Uint, E> {
bound: usize,
e: PhantomData<E>,
u: PhantomData<Uint>,
Expand Down Expand Up @@ -341,6 +345,10 @@ where
be_u128().map(|x| x as i128)
}

/// creates a little endian unsigned integer parser
///
/// * `bound`: the number of bytes that will be read
/// * `Uint`: the output type
#[inline]
fn le_uint<I, Uint, E: ParseError<I>>(bound: usize) -> impl Parser<I, Output = Uint, Error = E>
where
Expand All @@ -354,8 +362,8 @@ where
}
}

/// todo
pub struct LeUint<Uint, E> {
/// Little endian unsigned integer parser
struct LeUint<Uint, E> {
bound: usize,
e: PhantomData<E>,
u: PhantomData<Uint>,
Expand Down Expand Up @@ -1351,7 +1359,7 @@ where
}

/// TODO
pub struct Double<E> {
struct Double<E> {
e: PhantomData<E>,
}

Expand Down

0 comments on commit ed9ca5b

Please sign in to comment.