#owned #reference #cow #generic #smart-pointers

yanked into-owned

This crate has been merged into as-is crate and is no longer developed by the current author

0.3.0-alpha.3 Oct 15, 2022
0.3.0-alpha.2 May 24, 2020
0.2.2 May 9, 2020
0.1.0 May 4, 2020

#57 in #owned

MIT/Apache

34KB
766 lines

This crate has been merged into as-is crate and is no longer developed.


lib.rs:

This crate provides a trait IntoOwned and three enums Is<'a, T>, Gyu<'a, T>, and GyuMut<'a, T>.

IntoOwned associates a type with its owned variant. In this experimental version, IntoOwned is implemented only for primitive numeric types (i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize, f32, and f64) and their references.

Is<'a, T>, Gyu<'a, T>, and GyuMut<'a, T> are clone-on-write smart pointers similar to Cow<'a, B>. These can be constructed from a type which is IntoOwned. See each documentation for more.

No runtime deps

Features