pub enum Value {
Show 14 variants CompoundEnd, Byte(Namei8), Short(Namei16), Int(Namei32), Long(Namei64), Float(Namef32), Double(Namef64), ByteArray(NameVec<i8>), String(NameString), List(NameTagi32), ListEnd, Compound(Name), IntArray(NameVec<i32>), LongArray(NameVec<i64>),
}
Expand description

A shallow NBT value.

For every value except compounds and lists, this contains the value of the tag. For example, a Value::Byte will contain the name and the byte of that NBT tag.

The name part of each variant is optional, since elements in an NBT list do not have names. The end of lists do not have a name in the binary format, so it isn’t included here either.

See Parser for more information.

Variants

CompoundEnd

Byte(Namei8)

Short(Namei16)

Int(Namei32)

Long(Namei64)

Float(Namef32)

Double(Namef64)

ByteArray(NameVec<i8>)

String(NameString)

List(NameTagi32)

ListEnd

Compound(Name)

IntArray(NameVec<i32>)

LongArray(NameVec<i64>)

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.