Registry / utility / plain
library0.2.3rscratesunverified

A small Rust library that allows users to reinterpret data of certain types safely.

# Cargo.toml [dependencies] plain = "0.2.3"
INSTALL
IMPORT
SIG · PLAIN
P
plain
utilityrustv0.2.3
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.

Plain
use plain::Plain;

Demonstrates safe reinterpretation of bytes as a struct using the Plain derive macro.

use plain::Plain; #[derive(Plain)] struct MyStruct { x: u8, y: u8, } fn main() { let data = [1u8, 2u8]; let my_struct: &MyStruct = plain::from_bytes(&data).unwrap(); println!("{}, {}", my_struct.x, my_struct.y); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
plain — cargo add plain · libregistry