Expand description
Low-level interface for reading and writing the pot format.
Structs§
- Atom
- An encoded
Kind
, argument, and optional contained value. - Float
- A floating point number that can safely convert between other number types using compile-time evaluation when possible.
- Integer
- An integer type that can safely convert between other number types using compile-time evaluation.
- Unknown
Special - An unknown
Special
was encountered.
Enums§
Functions§
- read_
atom - Reads an atom.
- read_
atom_ header - Reads an atom header (kind and argument).
- read_
header - Reads a Pot header. See
write_header
for more information. Returns the version number contained within. - write_
atom_ header - Writes an atom header into
writer
. - write_
bool - Writes a
Kind::Special
atom with eitherSpecial::True
orSpecial::False
. - write_
bytes - Writes an
Kind::Bytes
atom with the given value. - write_
f32 - Writes an
Kind::Float
atom with the given value. - write_
f64 - Writes an
Kind::Float
atom with the given value. - write_
header - Writes the Pot header. A u32 written in big endian. The first three bytes
are ‘Pot’ (
0x506F74
), and the fourth byte is the version. The first version of Pot is 0. - write_
i8 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
i16 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
i24 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
i32 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
i48 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
i64 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
i128 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
named - Writes a
Kind::Special
atom withSpecial::Named
. - write_
none - Writes a
Kind::Special
atom withSpecial::None
. - write_
special - Writes a
Kind::Special
atom. - write_
str - Writes an
Kind::Bytes
atom with the bytes of the string. - write_
u8 - Writes an
Kind::UInt
atom with the given value. - write_
u16 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
u24 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
u32 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
u48 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
u64 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
u128 - Writes an
Kind::Int
atom with the given value. Will encode in a smaller format if possible. - write_
unit - Writes a
Kind::Special
atom withSpecial::Unit
.