Struct nbt::CompoundTag[][src]

pub struct CompoundTag {
    pub name: Option<String>,
    // some fields omitted
}

Fields

name: Option<String>

Implementations

impl CompoundTag[src]

pub fn new() -> Self[src]

pub fn named(name: impl ToString) -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn contains_key(&self, name: &str) -> bool[src]

pub fn insert(&mut self, name: impl ToString, tag: impl Into<Tag>)[src]

pub fn get<'a, 'b: 'a, T: TryFrom<&'a Tag>>(
    &'a self,
    name: &'b str
) -> Result<T, CompoundTagError<'_>>
[src]

pub fn get_mut<'a, 'b, T>(
    &'a mut self,
    name: &'b str
) -> Result<T, CompoundTagError<'_>> where
    'b: 'a,
    T: TryFrom<&'a mut Tag, Error = &'a Tag>, 
[src]

pub fn insert_i8(&mut self, name: impl ToString, value: i8)[src]

pub fn get_i8<'a>(&'a self, name: &'a str) -> Result<i8, CompoundTagError<'a>>[src]

pub fn insert_i16(&mut self, name: impl ToString, value: i16)[src]

pub fn get_i16<'a>(&'a self, name: &'a str) -> Result<i16, CompoundTagError<'a>>[src]

pub fn insert_i32(&mut self, name: impl ToString, value: i32)[src]

pub fn get_i32<'a>(&'a self, name: &'a str) -> Result<i32, CompoundTagError<'a>>[src]

pub fn insert_i64(&mut self, name: impl ToString, value: i64)[src]

pub fn get_i64<'a>(&'a self, name: &'a str) -> Result<i64, CompoundTagError<'a>>[src]

pub fn insert_f32(&mut self, name: impl ToString, value: f32)[src]

pub fn get_f32<'a>(&'a self, name: &'a str) -> Result<f32, CompoundTagError<'a>>[src]

pub fn insert_f64(&mut self, name: impl ToString, value: f64)[src]

pub fn get_f64<'a>(&'a self, name: &'a str) -> Result<f64, CompoundTagError<'a>>[src]

pub fn insert_i8_vec(&mut self, name: impl ToString, value: Vec<i8>)[src]

pub fn get_i8_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<&Vec<i8>, CompoundTagError<'a>>
[src]

pub fn insert_i32_vec(&mut self, name: impl ToString, value: Vec<i32>)[src]

pub fn get_i32_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<&Vec<i32>, CompoundTagError<'a>>
[src]

pub fn insert_i64_vec(&mut self, name: impl ToString, value: Vec<i64>)[src]

pub fn get_i64_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<&Vec<i64>, CompoundTagError<'a>>
[src]

pub fn insert_i16_vec(
    &mut self,
    name: impl ToString,
    vec: impl IntoIterator<Item = i16>
)
[src]

pub fn get_i16_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<Vec<i16>, CompoundTagError<'a>>
[src]

pub fn insert_f32_vec(
    &mut self,
    name: impl ToString,
    vec: impl IntoIterator<Item = f32>
)
[src]

pub fn get_f32_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<Vec<f32>, CompoundTagError<'a>>
[src]

pub fn insert_f64_vec(
    &mut self,
    name: impl ToString,
    vec: impl IntoIterator<Item = f64>
)
[src]

pub fn get_f64_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<Vec<f64>, CompoundTagError<'a>>
[src]

pub fn insert_bool(&mut self, name: &str, value: bool)[src]

pub fn get_bool<'a>(
    &'a self,
    name: &'a str
) -> Result<bool, CompoundTagError<'a>>
[src]

pub fn insert_str(&mut self, name: impl ToString, value: impl ToString)[src]

pub fn get_str<'a>(
    &'a self,
    name: &'a str
) -> Result<&str, CompoundTagError<'a>>
[src]

pub fn insert_compound_tag(&mut self, name: impl ToString, value: CompoundTag)[src]

pub fn get_compound_tag<'a>(
    &'a self,
    name: &'a str
) -> Result<&CompoundTag, CompoundTagError<'a>>
[src]

pub fn insert_str_vec(
    &mut self,
    name: impl ToString,
    vec: impl IntoIterator<Item = impl ToString>
)
[src]

pub fn get_str_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<Vec<&str>, CompoundTagError<'a>>
[src]

pub fn insert_compound_tag_vec(
    &mut self,
    name: impl ToString,
    vec: impl IntoIterator<Item = CompoundTag>
)
[src]

pub fn get_compound_tag_vec<'a>(
    &'a self,
    name: &'a str
) -> Result<Vec<&CompoundTag>, CompoundTagError<'a>>
[src]

pub fn iter(&self) -> impl DoubleEndedIterator<Item = (&String, &Tag)>[src]

pub fn iter_mut(
    &mut self
) -> impl DoubleEndedIterator<Item = (&String, &mut Tag)>
[src]

Trait Implementations

impl Clone for CompoundTag[src]

impl Debug for CompoundTag[src]

impl Display for CompoundTag[src]

impl From<CompoundTag> for Tag[src]

impl<'a> FromIterator<(&'a str, Tag)> for CompoundTag[src]

impl FromIterator<(String, Tag)> for CompoundTag[src]

impl IntoIterator for CompoundTag[src]

type Item = (String, Tag)

The type of the elements being iterated over.

type IntoIter = IntoIter

Which kind of iterator are we turning this into?

impl<'a> TryFrom<&'a Tag> for &'a CompoundTag[src]

type Error = &'a Tag

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut Tag> for &'a mut CompoundTag[src]

type Error = &'a Tag

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.