pub struct AVec<'a, T: AllocatorType> { /* private fields */ }Expand description
A vector that allocates its storage from a HtmlAllocator. When
finished, convert to ASlice via as_slice().
Implementations§
Source§impl<'a, T: AllocatorType> AVec<'a, T>
impl<'a, T: AllocatorType> AVec<'a, T>
pub fn new(allocator: &'a HtmlAllocator) -> AVec<'a, T>
pub fn new_with_capacity( allocator: &'a HtmlAllocator, capacity: u32, ) -> Result<AVec<'a, T>>
pub fn allocator(&self) -> &'a HtmlAllocator
pub fn len(&self) -> u32
pub fn push(&mut self, itemid: AId<T>) -> Result<()>
pub fn append<S: Into<ASlice<T>>>(&mut self, elements: S) -> Result<()>
pub fn as_slice(&self) -> ASlice<T>
pub fn reverse(&mut self)
pub fn extend_from_slice( &mut self, slice: &ASlice<T>, allocator: &HtmlAllocator, ) -> Result<()>
Trait Implementations§
Source§impl<'a, T: AllocatorType> IntoIterator for &AVec<'a, T>
impl<'a, T: AllocatorType> IntoIterator for &AVec<'a, T>
Source§impl<'a, T: AllocatorType> IntoIterator for AVec<'a, T>
impl<'a, T: AllocatorType> IntoIterator for AVec<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for AVec<'a, T>
impl<'a, T> !RefUnwindSafe for AVec<'a, T>
impl<'a, T> !Send for AVec<'a, T>
impl<'a, T> !Sync for AVec<'a, T>
impl<'a, T> Unpin for AVec<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for AVec<'a, T>
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