Registry / utility / derive-into-owned

derive-into-owned

JSON →
library0.2.0rscratesunverified

Custom derives to help with types containing Cow fields.

# Cargo.toml [dependencies] derive-into-owned = "0.2.0"
INSTALL
IMPORT
SIG · DERIVE-INTO-OWNED
D
derive-into-owned
utilityrustv0.2.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.

IntoOwned
use derive_into_owned::IntoOwned;

Derive IntoOwned for a struct with Cow fields.

use derive_into_owned::IntoOwned; #[derive(IntoOwned)] struct MyStruct<'a> { field: std::borrow::Cow<'a, str>, } fn main() { let s = MyStruct { field: "hello".into() }; let owned = s.into_owned(); println!("{}", owned.field); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
derive-into-owned — cargo add derive-into-owned · libregistry