Struct nbt::CompoundTag [−][src]
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]
&'a self,
name: &'b str
) -> Result<T, CompoundTagError<'_>>
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]
&'a mut self,
name: &'b str
) -> Result<T, CompoundTagError<'_>> where
'b: 'a,
T: TryFrom<&'a mut Tag, Error = &'a Tag>,
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]
&'a self,
name: &'a str
) -> Result<&Vec<i8>, CompoundTagError<'a>>
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]
&'a self,
name: &'a str
) -> Result<&Vec<i32>, CompoundTagError<'a>>
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]
&'a self,
name: &'a str
) -> Result<&Vec<i64>, CompoundTagError<'a>>
pub fn insert_i16_vec(
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = i16>
)
[src]
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = i16>
)
pub fn get_i16_vec<'a>(
&'a self,
name: &'a str
) -> Result<Vec<i16>, CompoundTagError<'a>>
[src]
&'a self,
name: &'a str
) -> Result<Vec<i16>, CompoundTagError<'a>>
pub fn insert_f32_vec(
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = f32>
)
[src]
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = f32>
)
pub fn get_f32_vec<'a>(
&'a self,
name: &'a str
) -> Result<Vec<f32>, CompoundTagError<'a>>
[src]
&'a self,
name: &'a str
) -> Result<Vec<f32>, CompoundTagError<'a>>
pub fn insert_f64_vec(
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = f64>
)
[src]
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = f64>
)
pub fn get_f64_vec<'a>(
&'a self,
name: &'a str
) -> Result<Vec<f64>, CompoundTagError<'a>>
[src]
&'a self,
name: &'a str
) -> Result<Vec<f64>, CompoundTagError<'a>>
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]
&'a self,
name: &'a str
) -> Result<bool, CompoundTagError<'a>>
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]
&'a self,
name: &'a str
) -> Result<&str, CompoundTagError<'a>>
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]
&'a self,
name: &'a str
) -> Result<&CompoundTag, CompoundTagError<'a>>
pub fn insert_str_vec(
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = impl ToString>
)
[src]
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = impl ToString>
)
pub fn get_str_vec<'a>(
&'a self,
name: &'a str
) -> Result<Vec<&str>, CompoundTagError<'a>>
[src]
&'a self,
name: &'a str
) -> Result<Vec<&str>, CompoundTagError<'a>>
pub fn insert_compound_tag_vec(
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = CompoundTag>
)
[src]
&mut self,
name: impl ToString,
vec: impl IntoIterator<Item = CompoundTag>
)
pub fn get_compound_tag_vec<'a>(
&'a self,
name: &'a str
) -> Result<Vec<&CompoundTag>, CompoundTagError<'a>>
[src]
&'a self,
name: &'a str
) -> Result<Vec<&CompoundTag>, CompoundTagError<'a>>
pub fn iter(&self) -> impl DoubleEndedIterator<Item = (&String, &Tag)>
[src]
pub fn iter_mut(
&mut self
) -> impl DoubleEndedIterator<Item = (&String, &mut Tag)>
[src]
&mut self
) -> impl DoubleEndedIterator<Item = (&String, &mut Tag)>
Trait Implementations
impl Clone for CompoundTag
[src]
fn clone(&self) -> CompoundTag
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CompoundTag
[src]
impl Display for CompoundTag
[src]
impl From<CompoundTag> for Tag
[src]
fn from(data: CompoundTag) -> Self
[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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a> TryFrom<&'a Tag> for &'a CompoundTag
[src]
type Error = &'a Tag
The type returned in the event of a conversion error.
fn try_from(tag: &'a Tag) -> Result<&CompoundTag, Self::Error>
[src]
impl<'a> TryFrom<&'a mut Tag> for &'a mut CompoundTag
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompoundTag
impl Send for CompoundTag
impl Sync for CompoundTag
impl Unpin for CompoundTag
impl UnwindSafe for CompoundTag
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,