From 6d995a74c7958b5b0efdcf2962477e0c74726e83 Mon Sep 17 00:00:00 2001 From: trevyn <230691+trevyn@users.noreply.github.com> Date: Wed, 28 Sep 2022 12:00:40 +0400 Subject: [PATCH] Document configuration generics (#581) Co-authored-by: Trangar --- src/config.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/config.rs b/src/config.rs index 594ca2e..bb3129f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -212,7 +212,7 @@ impl Config for T where { } -#[doc(hidden)] +/// Encodes all integer types in big endian. #[derive(Copy, Clone)] pub struct BigEndian {} @@ -220,7 +220,7 @@ impl InternalEndianConfig for BigEndian { const ENDIAN: Endian = Endian::Big; } -#[doc(hidden)] +/// Encodes all integer types in little endian. #[derive(Copy, Clone)] pub struct LittleEndian {} @@ -228,7 +228,7 @@ impl InternalEndianConfig for LittleEndian { const ENDIAN: Endian = Endian::Little; } -#[doc(hidden)] +/// Use fixed-size integer encoding. #[derive(Copy, Clone)] pub struct Fixint {} @@ -236,7 +236,7 @@ impl InternalIntEncodingConfig for Fixint { const INT_ENCODING: IntEncoding = IntEncoding::Fixed; } -#[doc(hidden)] +/// Use variable integer encoding. #[derive(Copy, Clone)] pub struct Varint {} @@ -244,7 +244,7 @@ impl InternalIntEncodingConfig for Varint { const INT_ENCODING: IntEncoding = IntEncoding::Variable; } -#[doc(hidden)] +/// Skip writing the length of fixed size arrays (`[u8; N]`) before writing the array. #[derive(Copy, Clone)] pub struct SkipFixedArrayLength {} @@ -252,7 +252,7 @@ impl InternalArrayLengthConfig for SkipFixedArrayLength { const SKIP_FIXED_ARRAY_LENGTH: bool = true; } -#[doc(hidden)] +/// Write the length of fixed size arrays (`[u8; N]`) before writing the array. #[derive(Copy, Clone)] pub struct WriteFixedArrayLength {} @@ -260,14 +260,14 @@ impl InternalArrayLengthConfig for WriteFixedArrayLength { const SKIP_FIXED_ARRAY_LENGTH: bool = false; } -#[doc(hidden)] +/// Sets an unlimited byte limit. #[derive(Copy, Clone)] pub struct NoLimit {} impl InternalLimitConfig for NoLimit { const LIMIT: Option = None; } -#[doc(hidden)] +/// Sets the byte limit to N. #[derive(Copy, Clone)] pub struct Limit {} impl InternalLimitConfig for Limit {