[−][src]Struct nobility::bin_encode::CompoundListWriter
A builder for a TAG_List of TAG_Compounds.
Example
let mut player = some_compound; let mut list = player.compound_list_field("Friends"); { let mut element = list.element(); element.field("Name").string("Alice"); element.field("Level").int(20); element.finish(); } { let mut element = list.element(); element.field("Name").string("Steve"); element.field("Level").int(17); element.finish(); } // finish() call is required. list.finish();
Panics
This object will panic on drop if finish() is not called.
Implementations
impl<'a> CompoundListWriter<'a>
[src]
pub fn element(&mut self) -> CompoundWriter<'_>
[src]
Start a new element in the list, returning a CompoundWriter to
build it. finish
must be called on the builder before
additional elements can be added.
pub fn finish(self)
[src]
Must be called before the builder goes out of scope, otherwise an invalid NBT document would be generated.
Trait Implementations
impl<'a> Debug for CompoundListWriter<'a>
[src]
impl<'a> Drop for CompoundListWriter<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for CompoundListWriter<'a>
[src]
impl<'a> Send for CompoundListWriter<'a>
[src]
impl<'a> Sync for CompoundListWriter<'a>
[src]
impl<'a> Unpin for CompoundListWriter<'a>
[src]
impl<'a> !UnwindSafe for CompoundListWriter<'a>
[src]
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, 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>,