Crate crusty_traits_core

Crate crusty_traits_core 

Source
Expand description

§Crusty Traits Core

This module provides core traits and types for creating C-compatible vtables for Rust traits. It includes the fundamental building blocks: CRef, CRefMut, CRepr, CDrop, and AsVTable.

§Core Types

  • CRef - A C-compatible reference to a trait object
  • CRefMut - A C-compatible mutable reference to a trait object
  • CRepr - A C-compatible representation of a trait object with its vtable
  • CDrop - A trait for dropping objects in a C-compatible way
  • AsVTable - A trait for converting types to vtables

These types work together to enable safe FFI interactions with Rust trait objects.

Structs§

CRef
A reference to a C-compatible object.
CRefMut
A reference to a C-compatible object.
CRepr
A trait that represents a buffer that can be converted to a C-compatible slice.

Traits§

AsVTable
A trait that provides a way to convert a type into a C-compatible vtable.
CDrop
A trait that represents dropping a Rust object in a C-compatible way.