pub enum List {
Byte(Vec<i8>),
Short(Vec<i16>),
Int(Vec<i32>),
Long(Vec<i64>),
Float(Vec<f32>),
Double(Vec<f64>),
ByteArray(Vec<Vec<i8>>),
String(Vec<String>),
List(Vec<List>),
Compound(Vec<Compound>),
IntArray(Vec<Vec<i32>>),
LongArray(Vec<Vec<i64>>),
}
Expand description
An NBT list value.
NBT lists are homogeneous, meaning each list element must be of the same type. This is opposed to a format like JSON where lists can be heterogeneous:
[42, "hello", {}]
Every possible element type has its own variant in this enum. As a result, heterogeneous lists are unrepresentable.
Variants
Byte(Vec<i8>)
Short(Vec<i16>)
Int(Vec<i32>)
Long(Vec<i64>)
Float(Vec<f32>)
Double(Vec<f64>)
ByteArray(Vec<Vec<i8>>)
String(Vec<String>)
List(Vec<List>)
Compound(Vec<Compound>)
IntArray(Vec<Vec<i32>>)
LongArray(Vec<Vec<i64>>)
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for List
impl<'de> Deserialize<'de> for List
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for List
Auto Trait Implementations
impl RefUnwindSafe for List
impl Send for List
impl Sync for List
impl Unpin for List
impl UnwindSafe for List
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more