deref_owned 0.2.0

Smart pointer owning its pointee and trait which allows conversion into owned type
Documentation

deref_owned

This crate provides a smart pointer Owned, which points to an owned value. It's similar to Cow, except that it's always owning its pointee. Moreover, a trait IntoOwned is provided, which allows conversion of pointers to an owned value though an .into_owned() method. The trait IntoOwned is implemented for:

  • &'a T where T: ?Sized + ToOwned
  • Cow<'a, T> where T: ?Sized + ToOwned
  • Owned<T>
  • Box<T>

Changelog

  • 2022-06-27: Version 0.2.0
    • Some more trait implementations (AsRef, AsMut, Borrow, BorrowMut, and Display) have been added for Owned (and Debug::fmt's output is transparent now)
    • Deref is now a supertrait of IntoOwned and IntoOwned::Owned must implement Borrow<<Self as Deref>::Target>
  • 2022-06-26: Version 0.1.0
    • Initial release