pub struct Array<'a> { /* private fields */ }
Expand description
Writer for an array.
Implementations§
source§impl<'a> Array<'a>
impl<'a> Array<'a>
sourcepub fn item<T: Primitive>(&mut self, value: T) -> &mut Self
pub fn item<T: Primitive>(&mut self, value: T) -> &mut Self
Write an item with a primitive value.
This is a shorthand for array.push().primitive(value)
.
sourcepub fn items<T: Primitive>(
&mut self,
values: impl IntoIterator<Item = T>,
) -> &mut Self
pub fn items<T: Primitive>( &mut self, values: impl IntoIterator<Item = T>, ) -> &mut Self
Write a sequence of items with primitive values.
sourcepub fn typed<T>(self) -> TypedArray<'a, T>
pub fn typed<T>(self) -> TypedArray<'a, T>
Convert into a typed version.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Array<'a>
impl<'a> RefUnwindSafe for Array<'a>
impl<'a> Send for Array<'a>
impl<'a> Sync for Array<'a>
impl<'a> Unpin for Array<'a>
impl<'a> !UnwindSafe for Array<'a>
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