[−][src]Crate into_owned
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.
Enums
Gyu | Represents an owned value or an immutably borrowed reference. |
GyuMut | Represents an owned value or a mutably borrowed reference. |
Is | Represents an owned value, an immutably borrowed reference, or a mutably borrowed reference. |
Traits
IntoOwned | A trait for associating a type with its owned variant. |
Owned | A trait for an owned type. |