Byte Engine Docs
View on docs.rs

utils

Generated Rust API reference for byte_engine.

byte_engine / utils


Module utils

The utils module provides engine utility types through the main byte_engine crate API.

Quick Reference

ItemKindDescription
CountingAllocatorstructUse this allocator to track memory allocations made.
allocation_countfnCall 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:107

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 DowncastSend for CountingAllocator
  • fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for CountingAllocator
  • fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
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 Pointable for CountingAllocator
  • const ALIGN: usize
  • type Init = T
  • unsafe fn init(init: <T as Pointable>::Init) -> usize
  • unsafe fn deref<'a>(ptr: usize) -> &'a T
  • unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
  • unsafe fn drop(ptr: usize)
impl Pointee for CountingAllocator
  • type Metadata = ()
impl Read for CountingAllocator
impl WithSubscriber for CountingAllocator

Functions

allocation_count

fn allocation_count() -> usize

Defined in crates/byte-engine/src/lib.rs:127-129

Call this function to get the current allocation count of the global counting allocator.

On this page