pub enum Value {
Show 14 variants
CompoundEnd,
Byte(Name, i8),
Short(Name, i16),
Int(Name, i32),
Long(Name, i64),
Float(Name, f32),
Double(Name, f64),
ByteArray(Name, Vec<i8>),
String(Name, String),
List(Name, Tag, i32),
ListEnd,
Compound(Name),
IntArray(Name, Vec<i32>),
LongArray(Name, Vec<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.
Formats the value using the given formatter.
Read more
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
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.