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 for AstArray<T>where
T: Copy,
impl<T> Eq for AstArray<T>where
T: Eq,
Source§impl<'a, T> IntoIterator for &'a AstArray<T>
impl<'a, T> IntoIterator for &'a AstArray<T>
Source§impl<T> PartialEq for AstArray<T>where
T: PartialEq,
impl<T> PartialEq for AstArray<T>where
T: PartialEq,
impl<T> StructuralPartialEq for AstArray<T>where
T: PartialEq,
Source§impl<T: WriteJson> WriteJson for AstArray<T>
impl<T: WriteJson> WriteJson for AstArray<T>
fn write_json(&self, enc: &mut AstJsonEncoder)
Source§impl WriteJson for AstArray<c_char>
impl WriteJson for AstArray<c_char>
fn write_json(&self, enc: &mut AstJsonEncoder)
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