Registry / utility / owning-ref

owning-ref

JSON →
library0.4.1rscratesunverified

A library for creating references that carry their owner with them.

# Cargo.toml [dependencies] owning_ref = "0.4.1"
INSTALL
IMPORT
SIG · OWNING-REF
O
owning-ref
utilityrustv0.4.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.

OwningRef
use owning_ref::OwningRef;

Creates an owning reference from a Vec.

use owning_ref::OwningRef; fn main() { let vec = vec![1, 2, 3]; let ref_ = OwningRef::new(vec); println!("{:?}", ref_); }
Debug
Known issues
gotchaUnsafe code; misuse can cause undefined behavior.
fix
Ensure the owner outlives all references.
affects: >=0.4.0
Upgrade
Version history
0.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
owning-ref — cargo add owning-ref · libregistry