utils
Generated Rust API reference for byte_engine.
Module utils
The utils module provides engine utility types through the main byte_engine crate API.
Quick Reference
| Item | Kind | Description |
|---|---|---|
CountingAllocator | struct | Use this allocator to track memory allocations made. |
allocation_count | fn | Call this function to get the current allocation count of the global counting allocator. |
Structs
CountingAllocator
struct CountingAllocator;Defined in crates/byte-engine/src/lib.rs:101
Use this allocator to track memory allocations made.
Trait Implementations
impl ArchivePointee for CountingAllocator
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for CountingAllocator
impl Downcast for CountingAllocator
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for CountingAllocator
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl GlobalAlloc for CountingAllocator
-
unsafe fn alloc(&self, layout: Layout) -> *mut u8 -
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) -
unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8
impl Instrument for CountingAllocator
impl LayoutRaw for CountingAllocator
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for CountingAllocator
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for CountingAllocator
-
type Metadata = ()
impl Read for CountingAllocator
impl WithSubscriber for CountingAllocator
Functions
allocation_count
fn allocation_count() -> usizeDefined in crates/byte-engine/src/lib.rs:126-128
Call this function to get the current allocation count of the global counting allocator.