[−][src]Enum nobility::TagType
NBT tags are a 1-byte value used to specify which type is going to
follow. The integer values of each enum corresponds to the actual
ones used, and tag as u8
can be used to cast these to their binary
representation.
Tags are sequentially allocated. As of writing (2020), the most
recent tag is TAG_Long_Array
, added in Minecraft 1.12.
Variants (Non-exhaustive)
Used to mark the end of a Compound tag. TAG_End
, ID 0.
Contains an i8.
TAG_Byte
, ID 1.
Contains an i16
. TAG_Short
, ID 2.
Contains an i32
. TAG_Int
, ID 3.
Contains an i64
. TAG_Long
, ID 4.
Contains an f32
. TAG_Float
, ID 5.
Contains an f64
. TAG_Double
, ID 6.
Contains a &[u8]
. TAG_Byte_Array
, ID 7.
Contains a bin_decode::NbtString. TAG_String
, ID 8.
Contains a bin_decode::List with the list of its elements as a second tag. TAG_List
, ID 9.
Contains a bin_decode::Compound. This is a key-value map, but ordered. TAG_Compound
, ID 10.
Contains a bin_decode::IntArray. TAG_Int_Array
, ID 11.
Contains a bin_decode::LongArray. TAG_Long_Array
, ID 12.
Trait Implementations
impl Clone for TagType
[src]
impl Copy for TagType
[src]
impl Debug for TagType
[src]
impl Eq for TagType
[src]
impl Hash for TagType
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for TagType
[src]
pub fn cmp(&self, other: &TagType) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<TagType> for TagType
[src]
pub fn eq(&self, other: &TagType) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<TagType> for TagType
[src]
pub fn partial_cmp(&self, other: &TagType) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for TagType
[src]
impl StructuralPartialEq for TagType
[src]
Auto Trait Implementations
impl RefUnwindSafe for TagType
[src]
impl Send for TagType
[src]
impl Sync for TagType
[src]
impl Unpin for TagType
[src]
impl UnwindSafe for TagType
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,