pub struct AstArray<T> {
pub data: *mut T,
pub size: usize,
}Fields§
§data: *mut T§size: usizeImplementations§
Source§impl<T> AstArray<T>
impl<T> AstArray<T>
Sourcepub fn as_slice(&self) -> &[T]
pub fn as_slice(&self) -> &[T]
The elements as a slice. C++ AstArray exposes begin()/end() over
[data, data + size); the arena keeps the backing storage alive.
§Safety note
data/size come from the arena allocator and are always a valid region
(or data == null with size == 0), so this is sound for live nodes.
pub fn iter(&self) -> Iter<'_, T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl<T: Copy> Copy for AstArray<T>
impl<T: Eq> Eq for AstArray<T>
Source§impl<'a, T> IntoIterator for &'a AstArray<T>
impl<'a, T> IntoIterator for &'a AstArray<T>
Source§impl<T: PartialEq> PartialEq for AstArray<T>
impl<T: PartialEq> PartialEq for AstArray<T>
impl<T: PartialEq> StructuralPartialEq for AstArray<T>
Auto Trait Implementations§
impl<T> !Send for AstArray<T>
impl<T> !Sync for AstArray<T>
impl<T> Freeze for AstArray<T>
impl<T> RefUnwindSafe for AstArray<T>where
T: RefUnwindSafe,
impl<T> Unpin for AstArray<T>
impl<T> UnsafeUnpin for AstArray<T>
impl<T> UnwindSafe for AstArray<T>where
T: RefUnwindSafe,
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