//! Length-field encoder for wire-format sequences.
use put_u32;
use crateWireEncodeErr;
/// Append a little-endian `u32` length converted from `usize`.
///
/// # Preconditions
///
/// `out` is a valid `Vec<u8>`. `value` is the true element or byte
/// count of the payload that will follow this length field.
///
/// # Return semantics
///
/// On success, four little-endian bytes representing `value` as `u32`
/// are appended to `out` and `Ok(())` is returned.
///
/// # Errors
///
/// Returns an actionable error when `value` cannot fit in the wire-format
/// length field. This prevents platform-dependent `usize` widths from
/// leaking into the portable VIR0 blob.