[][src]Enum raw_nbt::Value

pub enum Value {
    Byte(i8),
    Short(i16),
    Int(i32),
    Long(i64),
    Float(f32),
    Double(f64),
    ByteArray(Vec<i8>),
    Str(String),
    Compound(Compound),
    IntArray(Vec<i32>),
    LongArray(Vec<i64>),
    EndList,
    EmptyByteList,
    ByteList(Vec<i8>),
    ShortList(Vec<i16>),
    IntList(Vec<i32>),
    LongList(Vec<i64>),
    FloatList(Vec<f32>),
    DoubleList(Vec<f64>),
    ByteArrayList(Vec<Vec<i8>>),
    StrList(Vec<String>),
    ListList(Vec<Value>),
    CompoundList(Vec<Compound>),
    IntArrayList(Vec<Vec<i32>>),
    LongArrayList(Vec<Vec<i64>>),
}

An NBT Value.

Variants

Byte(i8)Short(i16)Int(i32)Long(i64)Float(f32)Double(f64)ByteArray(Vec<i8>)Str(String)Compound(Compound)IntArray(Vec<i32>)LongArray(Vec<i64>)EndListEmptyByteList

Empty byte list.

EmptyByteList variant is distinguished from ByteList because it is often used as empty other types.

ByteList(Vec<i8>)ShortList(Vec<i16>)IntList(Vec<i32>)LongList(Vec<i64>)FloatList(Vec<f32>)DoubleList(Vec<f64>)ByteArrayList(Vec<Vec<i8>>)StrList(Vec<String>)ListList(Vec<Value>)CompoundList(Vec<Compound>)IntArrayList(Vec<Vec<i32>>)LongArrayList(Vec<Vec<i64>>)

Methods

impl Value[src]

pub fn byte(&self) -> Result<i8>[src]

pub fn short(&self) -> Result<i16>[src]

pub fn int(&self) -> Result<i32>[src]

pub fn long(&self) -> Result<i64>[src]

pub fn float(&self) -> Result<f32>[src]

pub fn double(&self) -> Result<f64>[src]

pub fn byte_array(&self) -> Result<&Vec<i8>>[src]

pub fn str(&self) -> Result<&str>[src]

pub fn compound(&self) -> Result<&Compound>[src]

pub fn get(&self, name: &str) -> Result<&Value>[src]

Get value of compound.

pub fn int_array(&self) -> Result<&Vec<i32>>[src]

pub fn long_array(&self) -> Result<&Vec<i64>>[src]

pub fn byte_list(&self) -> Result<Cow<Vec<i8>>>[src]

pub fn short_list(&self) -> Result<Cow<Vec<i16>>>[src]

pub fn int_list(&self) -> Result<Cow<Vec<i32>>>[src]

pub fn long_list(&self) -> Result<Cow<Vec<i64>>>[src]

pub fn float_list(&self) -> Result<Cow<Vec<f32>>>[src]

pub fn double_list(&self) -> Result<Cow<Vec<f64>>>[src]

pub fn byte_array_list(&self) -> Result<Cow<Vec<Vec<i8>>>>[src]

pub fn str_list(&self) -> Result<Cow<Vec<String>>>[src]

pub fn list_list(&self) -> Result<Cow<Vec<Value>>>[src]

pub fn compound_list(&self) -> Result<Cow<Vec<Compound>>>[src]

pub fn int_array_list(&self) -> Result<Cow<Vec<Vec<i32>>>>[src]

pub fn long_array_list(&self) -> Result<Cow<Vec<Vec<i64>>>>[src]

Trait Implementations

impl PartialEq<Value> for Value[src]

impl Clone for Value[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Value[src]

Auto Trait Implementations

impl Send for Value

impl Sync for Value

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.