Registry / utility / newtype

newtype

JSON →
library0.2.1rscratesunverified

Custom derive macro to give tuple structs newtype semantics with automatic delegation.

# Cargo.toml [dependencies] newtype = "0.2.1"
INSTALL
IMPORT
SIG · NEWTYPE
N
newtype
utilityrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Newtype
use newtype::Newtype;

Defines a newtype with the Newtype derive macro.

use newtype::Newtype; #[derive(Newtype)] struct MyId(u64); fn main() { let id = MyId(42); println!("ID: {}", id.0); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
newtype — cargo add newtype · libregistry