pub enum Value {
Show 25 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>),
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>>),
}Expand description
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>)
EndList
EmptyByteList
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>>)
Implementations§
Source§impl Value
impl Value
pub fn byte(&self) -> Result<i8>
pub fn short(&self) -> Result<i16>
pub fn int(&self) -> Result<i32>
pub fn long(&self) -> Result<i64>
pub fn float(&self) -> Result<f32>
pub fn double(&self) -> Result<f64>
pub fn byte_array(&self) -> Result<&Vec<i8>>
pub fn str(&self) -> Result<&str>
pub fn compound(&self) -> Result<&Compound>
pub fn int_array(&self) -> Result<&Vec<i32>>
pub fn long_array(&self) -> Result<&Vec<i64>>
pub fn byte_list(&self) -> Result<Cow<'_, Vec<i8>>>
pub fn short_list(&self) -> Result<Cow<'_, Vec<i16>>>
pub fn int_list(&self) -> Result<Cow<'_, Vec<i32>>>
pub fn long_list(&self) -> Result<Cow<'_, Vec<i64>>>
pub fn float_list(&self) -> Result<Cow<'_, Vec<f32>>>
pub fn double_list(&self) -> Result<Cow<'_, Vec<f64>>>
pub fn byte_array_list(&self) -> Result<Cow<'_, Vec<Vec<i8>>>>
pub fn str_list(&self) -> Result<Cow<'_, Vec<String>>>
pub fn list_list(&self) -> Result<Cow<'_, Vec<Value>>>
pub fn compound_list(&self) -> Result<Cow<'_, Vec<Compound>>>
pub fn int_array_list(&self) -> Result<Cow<'_, Vec<Vec<i32>>>>
pub fn long_array_list(&self) -> Result<Cow<'_, Vec<Vec<i64>>>>
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more