my_box 0.2.2

An educational, zero-dependency Rust implementation of a heap-allocated smart pointer (MyBox<T>), mirroring std::boxed::Box<T> for learning purposes.
Documentation
# MyBox

[![Documentation](https://docs.rs/my-box/badge)](https://docs.rs/my-box)
[![Crates.io](https://img.shields.io/crates/v/my-box.svg)](https://crates.io/crates/my-box)

A zero-dependency, educational Rust library that reimplements `Box<T>` from first principles.

## Quick Start

```rust
use my_box::MyBox;

let num = MyBox::new(42);
assert_eq!(*num, 42);

let s = MyBox::new(String::from("hello"));
println!("{}", *s);
```

## Features

- **Single-ownership heap allocation** — one owner, automatic cleanup via `Drop`
- **Zero-sized type (ZST) safe**`MyBox::new(())` works correctly
- **Recursive data structures**`Box<List<T>>` breaks infinite size cycles
- **Trait object support**`Box<dyn Trait>` for runtime polymorphism
- **Full trait forwarding**`Clone`, `Deref`, `PartialEq`, `Hash`, `Display`, and more
- **Fallible allocation**`try_new` returns `Result` instead of panicking on OOM
- **Consume to inner value**`into_inner` extracts `T` from `MyBox<T>`

## Installation

```bash
cargo add my-box
```

## Documentation

Full API documentation is available at [docs.rs/my-box](https://docs.rs/my-box).

## License

- Apache License, Version 2.0 ([LICENSE]LICENSE)