Skip to content

Commit

Permalink
docs: document byte format
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Jun 8, 2024
1 parent 326e9ff commit 75d64d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/serde/src/quantity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
//! This is defined as a "hex encoded unsigned integer", with a special case of 0 being `0x0`.
//!
//! A regex for this format is: `^0x([1-9a-f]+[0-9a-f]*|0)$`.
//!
//! This is only valid for human-readable [`serde`] implementations.
//! For non-human-readable implementations, the format is unspecified.
//! Currently, it is uses a fixed-width big-endian byte-array.

use private::ConvertRuint;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
Expand Down Expand Up @@ -88,7 +92,7 @@ pub mod vec {
}
}

/// Private implementation details of the [`quantity`] module.
/// Private implementation details of the [`quantity`](self) module.
mod private {
#[doc(hidden)]
pub trait ConvertRuint: Copy + Sized {
Expand Down

0 comments on commit 75d64d3

Please sign in to comment.