pub struct ArrayBuilder<T> { /* private fields */ }Expand description
A simple growable buffer.
Upstream hands out ArraySlices aliasing the builder’s array; here the
builder owns a Vec<T> and ranges are borrowed as plain slices.
Implementations§
Source§impl<T> ArrayBuilder<T>
impl<T> ArrayBuilder<T>
pub const fn new() -> Self
Sourcepub fn as_span_mut(&mut self) -> &mut [T]
pub fn as_span_mut(&mut self) -> &mut [T]
The items, mutably.
Sourcepub fn as_slice_to(&self, length: usize) -> &[T]
pub fn as_slice_to(&self, length: usize) -> &[T]
The first length items (the original’s AsSlice(length); its
AsSlice() is as_span).
Sourcepub fn as_slice_mut(&mut self, start: usize, length: usize) -> &mut [T]
pub fn as_slice_mut(&mut self, start: usize, length: usize) -> &mut [T]
length items starting at start, mutably.
Trait Implementations§
Source§impl<T: Debug> Debug for ArrayBuilder<T>
impl<T: Debug> Debug for ArrayBuilder<T>
Source§impl<T: Default> Default for ArrayBuilder<T>
impl<T: Default> Default for ArrayBuilder<T>
Source§impl<T> Index<usize> for ArrayBuilder<T>
impl<T> Index<usize> for ArrayBuilder<T>
Auto Trait Implementations§
impl<T> Freeze for ArrayBuilder<T>
impl<T> RefUnwindSafe for ArrayBuilder<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for ArrayBuilder<T>
impl<T> Sync for ArrayBuilder<T>
impl<T> Unpin for ArrayBuilder<T>
impl<T> UnsafeUnpin for ArrayBuilder<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for ArrayBuilder<T>where
Vec<T>: UnwindSafe,
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more