Skip to main content

write_record

Function write_record 

Source
pub fn write_record(
    out: &mut [u8],
    enc: Encoding,
    bytes: &[u8],
    expire_at: Option<u64>,
)
Expand description

Write a whole record into out, which must be exactly record_len long.

bytes is the string as the caller gave it. When enc is Encoding::Int the digits are not stored, the integer they parse to is, and the caller has already established that they parse by choosing that encoding.