Registry / utility / ownedbytes

ownedbytes

JSON →
library0.9.0rscratesunverified

Expose data as static slice, providing an owned byte buffer that can be borrowed as a static slice.

# Cargo.toml [dependencies] ownedbytes = "0.9.0"
INSTALL
IMPORT
SIG · OWNEDBYTES
O
ownedbytes
utilityrustv0.9.0
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.

OwnedBytes
use ownedbytes::OwnedBytes;

Create an OwnedBytes from a Vec<u8> and borrow it as a byte slice.

use ownedbytes::OwnedBytes; fn main() { let data = vec![1, 2, 3, 4]; let owned = OwnedBytes::new(data); let slice: &[u8] = &owned; println!("Slice: {:?}", slice); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.9.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ownedbytes — cargo add ownedbytes · libregistry