Enum golden_apple::nbt::Tag[][src]

pub enum Tag {
Show 13 variants Byte(i8), Short(i16), Int(i32), Long(i64), Float(f32), Double(f64), ByteArray(Vec<i8>), String(String), List(Vec<Tag>), Compound(Vec<NamedTag>), IntArray(Vec<i32>), LongArray(Vec<i64>), End,
}
Expand description

Represents a value in a NBT structure.

Variants

Byte(i8)

A signed byte.

Tuple Fields of Byte

0: i8
Short(i16)

A Java Short.

Tuple Fields of Short

0: i16
Int(i32)

A Java Int.

Tuple Fields of Int

0: i32
Long(i64)

A Java Long.

Tuple Fields of Long

0: i64
Float(f32)

A Java Float.

Tuple Fields of Float

0: f32
Double(f64)

A Java Double.

Tuple Fields of Double

0: f64
ByteArray(Vec<i8>)

An array of signed bytes.

Tuple Fields of ByteArray

0: Vec<i8>
String(String)

A Java modified UTF-8 string.

Tuple Fields of String

0: String
List(Vec<Tag>)

A list type containing a list of tags without names. All tags will be of the same type.

Tuple Fields of List

0: Vec<Tag>
Compound(Vec<NamedTag>)

A compound type containing a list of named tags.

Tuple Fields of Compound

0: Vec<NamedTag>
IntArray(Vec<i32>)

An array of Java Ints.

Tuple Fields of IntArray

0: Vec<i32>
LongArray(Vec<i64>)

An array of Java Longs.

Tuple Fields of LongArray

0: Vec<i64>
End

Represents the end of a compound or list tag.

Implementations

Writes this tag to a series of bytes. Does not include the tag’s type ID prefix. Does include list and compound tag’s ending byte.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.