Expand description
Implements NBT serialisation and deserialization for three different integer encodings.
Re-exports§
pub use snbt::from_string;snbtpub use snbt::to_string;snbt
Modules§
- snbt
snbt - Implements stringified NBT support. This is the human-readable NBT format that is often used in Minecraft commands.
Structs§
- Deserializer
- NBT deserializer. Rather than using this directly you should probably use one of the methods
provided in the root, such as
from_le_bytes. - Serializer
- NBT data serializer.
Enums§
- BigEndian
- Defines big-endian serialization.
- Error
- Errors that can occur while serializing or deserializing NBT data.
- Field
Type - NBT field type
- Little
Endian - Defines little-endian serialization.
- Network
Little Endian - Used by Bedrock for NBT transferred over the network.
This format is the same as
LittleEndian, except that type lengths (such as for strings or lists), are varints instead of shorts. The integer and long types are also varints. - Value
- General NBT value type that can represent any value.
- Variant
- NBT format variant.
Traits§
- Endianness
Impl - Implemented by all NBT variants.
Functions§
- from_
be_ bytes - Reads a single object of type
Tfrom the given buffer. - from_
bytes - Reads a single object of type
Tfrom the given buffer. - from_
le_ bytes - Reads a single object of type
Tfrom the given buffer. - from_
net_ bytes - Reads a single object of type
Tfrom the given buffer. - to_
be_ bytes - Serializes the given data in big endian format.
- to_
be_ bytes_ in - Serializes the given data in big endian format.
- to_
bytes - Serializes the given data in any endian format.
- to_
bytes_ in - Serializes the given data in any endian format.
- to_
le_ bytes - Serializes the given data in little endian format.
- to_
le_ bytes_ in - Serializes the given data in little endian format.
- to_
net_ bytes - Serializes the given data in network little endian format.
- to_
net_ bytes_ in - Serializes the given data in network little endian format.
Type Aliases§
- Result
- Convenient type definition for
Result<T, nbtx::Error>.