This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit e2e3d388165d80a833b7cb10f0ca1606f89963be Author: Kriskras99 <[email protected]> AuthorDate: Wed Nov 12 13:30:05 2025 +0100 docs: Improve documentation --- avro/src/encode.rs | 3 +++ avro/src/schema.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/avro/src/encode.rs b/avro/src/encode.rs index 38203f9..f19352c 100644 --- a/avro/src/encode.rs +++ b/avro/src/encode.rs @@ -39,6 +39,9 @@ pub fn encode<W: Write>(value: &Value, schema: &Schema, writer: &mut W) -> AvroR encode_internal(value, schema, rs.get_names(), &None, writer) } +/// Encode `s` as the _bytes_ primitive type. +/// +/// This writes the length as the _long_ primitive and then the raw bytes. pub(crate) fn encode_bytes<B: AsRef<[u8]> + ?Sized, W: Write>( s: &B, mut writer: W, diff --git a/avro/src/schema.rs b/avro/src/schema.rs index 5839578..5c2996a 100644 --- a/avro/src/schema.rs +++ b/avro/src/schema.rs @@ -795,7 +795,7 @@ impl RecordField { } } -/// A description of an Enum schema. +/// A description of a Record schema. #[derive(bon::Builder, Debug, Clone)] pub struct RecordSchema { /// The name of the schema @@ -836,7 +836,7 @@ pub struct EnumSchema { pub attributes: BTreeMap<String, Value>, } -/// A description of a Union schema. +/// A description of a Fixed schema. #[derive(bon::Builder, Debug, Clone)] pub struct FixedSchema { /// The name of the schema @@ -883,7 +883,7 @@ impl FixedSchema { } } -/// A description of a Union schema. +/// A description of a Decimal schema. /// /// `scale` defaults to 0 and is an integer greater than or equal to 0 and `precision` is an /// integer greater than 0.
