pub struct CompoundTag {
pub name: Option<String>,
/* private fields */
}
Fields§
§name: Option<String>
Implementations§
Source§impl CompoundTag
impl CompoundTag
pub fn new() -> Self
pub fn named(name: impl ToString) -> Self
pub fn is_empty(&self) -> bool
pub fn contains_key(&self, name: &str) -> bool
pub fn insert(&mut self, name: impl ToString, tag: impl Into<Tag>)
pub fn get<'a, 'b: 'a, T: TryFrom<&'a Tag>>( &'a self, name: &'b str, ) -> Result<T, CompoundTagError<'_>>
pub fn get_mut<'a, 'b, T>( &'a mut self, name: &'b str, ) -> Result<T, CompoundTagError<'_>>
pub fn insert_i8(&mut self, name: impl ToString, value: i8)
pub fn get_i8<'a>(&'a self, name: &'a str) -> Result<i8, CompoundTagError<'a>>
pub fn insert_i16(&mut self, name: impl ToString, value: i16)
pub fn get_i16<'a>(&'a self, name: &'a str) -> Result<i16, CompoundTagError<'a>>
pub fn insert_i32(&mut self, name: impl ToString, value: i32)
pub fn get_i32<'a>(&'a self, name: &'a str) -> Result<i32, CompoundTagError<'a>>
pub fn insert_i64(&mut self, name: impl ToString, value: i64)
pub fn get_i64<'a>(&'a self, name: &'a str) -> Result<i64, CompoundTagError<'a>>
pub fn insert_f32(&mut self, name: impl ToString, value: f32)
pub fn get_f32<'a>(&'a self, name: &'a str) -> Result<f32, CompoundTagError<'a>>
pub fn insert_f64(&mut self, name: impl ToString, value: f64)
pub fn get_f64<'a>(&'a self, name: &'a str) -> Result<f64, CompoundTagError<'a>>
pub fn insert_i8_vec(&mut self, name: impl ToString, value: Vec<i8>)
pub fn get_i8_vec<'a>( &'a self, name: &'a str, ) -> Result<&Vec<i8>, CompoundTagError<'a>>
pub fn insert_i32_vec(&mut self, name: impl ToString, value: Vec<i32>)
pub fn get_i32_vec<'a>( &'a self, name: &'a str, ) -> Result<&Vec<i32>, CompoundTagError<'a>>
pub fn insert_i64_vec(&mut self, name: impl ToString, value: Vec<i64>)
pub fn get_i64_vec<'a>( &'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>, )
pub fn get_i16_vec<'a>( &'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>, )
pub fn get_f32_vec<'a>( &'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>, )
pub fn get_f64_vec<'a>( &'a self, name: &'a str, ) -> Result<Vec<f64>, CompoundTagError<'a>>
pub fn insert_bool(&mut self, name: &str, value: bool)
pub fn get_bool<'a>( &'a self, name: &'a str, ) -> Result<bool, CompoundTagError<'a>>
pub fn insert_str(&mut self, name: impl ToString, value: impl ToString)
pub fn get_str<'a>( &'a self, name: &'a str, ) -> Result<&str, CompoundTagError<'a>>
pub fn insert_compound_tag(&mut self, name: impl ToString, value: CompoundTag)
pub fn get_compound_tag<'a>( &'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>, )
pub fn get_str_vec<'a>( &'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>, )
pub fn get_compound_tag_vec<'a>( &'a self, name: &'a str, ) -> Result<Vec<&CompoundTag>, CompoundTagError<'a>>
pub fn iter(&self) -> impl DoubleEndedIterator<Item = (&String, &Tag)>
pub fn iter_mut( &mut self, ) -> impl DoubleEndedIterator<Item = (&String, &mut Tag)>
Trait Implementations§
Source§impl Clone for CompoundTag
impl Clone for CompoundTag
Source§fn clone(&self) -> CompoundTag
fn clone(&self) -> CompoundTag
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompoundTag
impl Debug for CompoundTag
Source§impl Display for CompoundTag
impl Display for CompoundTag
Source§impl From<CompoundTag> for Tag
impl From<CompoundTag> for Tag
Source§fn from(data: CompoundTag) -> Self
fn from(data: CompoundTag) -> Self
Converts to this type from the input type.
Source§impl<'a> FromIterator<(&'a str, Tag)> for CompoundTag
impl<'a> FromIterator<(&'a str, Tag)> for CompoundTag
Source§impl FromIterator<(String, Tag)> for CompoundTag
impl FromIterator<(String, Tag)> for CompoundTag
Source§impl IntoIterator for CompoundTag
impl IntoIterator for CompoundTag
Source§impl<'a> TryFrom<&'a Tag> for &'a CompoundTag
impl<'a> TryFrom<&'a Tag> for &'a CompoundTag
Auto Trait Implementations§
impl Freeze for CompoundTag
impl RefUnwindSafe for CompoundTag
impl Send for CompoundTag
impl Sync for CompoundTag
impl Unpin for CompoundTag
impl UnwindSafe for CompoundTag
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