# into_inner
[](https://crates.io/crates/into_inner)
[](https://docs.rs/into_inner)
A simple trait and derive macro for extracting the inner value from tuple structs (newtypes) with a single field.
---
## Overview
The `into_inner` crate provides the `IntoInner` trait and a convenient `#[derive(IntoInner)]` macro for tuple structs with exactly one field. This allows you to easily extract the wrapped value from your newtypes without boilerplate.
---
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
into_inner = "0.1"
```
Then, in your code:
```rust
use into_inner::IntoInner;
#[derive(IntoInner)]
struct MyWrapper(String);
let wrapper = MyWrapper("Hello, world!".to_string());
let inner = wrapper.into_inner();
assert_eq!(inner, "Hello, world!");
```
---
## Features
- Derive macro for tuple structs with a single field.
- Compile-time errors for unsupported struct types.
- No dependencies outside of proc-macro ecosystem.
---
## License
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT license](LICENSE-MIT) at your option.
---
## Contribution
Contributions are welcome! Please open issues or pull requests on [GitLab](https://gitlab.com/max.martinelli/into_inner).
---
## See Also
- [into_inner_derive](https://crates.io/crates/into_inner_derive) — the procedural macro implementation.