deref_owned
For documentation see crate-level documentation comment.
Changelog
- 2022-07-04:
- Added example to crate-level documentation comment
- 2022-07-02:
- Struct
Ownedis now a simple wrapper with one type argument (of its inner value). Owned::newhas been removed.- The associated type
GenericCow<B>::Ownedhas been removed in favor of using<B as ToOwned>::Owned. - Modified documentation to avoid the terminology "smart pointer"
- Modified tests
- Struct
- 2022-07-01: Version 0.7.0
- Removed
Derefas supertrait ofGenericCowand added type argument toGenericCowinstead
- Removed
- 2022-07-01: Version 0.6.1
- Corrected
Owned::borrowedto bePhantomData<for<'a> fn(&'a O) -> &'a B>instead of usingPhantomData<*const B>, which broke correct autotrait behavior
- Corrected
- 2022-07-01: Version 0.6.0
- Removed lifetime argument for
Owned - Fixed changelog for version 0.5.0
- Removed lifetime argument for
- 2022-07-01: Version 0.5.0
- A lifetime and type argument for the borrowed type has been added to
Owned, which now contains aPhantomDataof a reference to the borrowed type. This makesOwnedRefsuperfluous, which has been removed. IntoOwnedhas been renamed toGenericCow.- Removed
AsMut,BorrowMutandDerefMutimplementations forOwned
- A lifetime and type argument for the borrowed type has been added to
- 2022-06-30: Version 0.4.0
- Removed implementations of
IntoOwnedforBox<T>,Vec<T>, andString - New wrapper type
OwnedRef<T>
- Removed implementations of
- 2022-06-28: Version 0.3.0
- Added implementations of
IntoOwnedforBox<T>(where T: ?Sized),Vec<T>, andString, withIntoOwned::Ownedbeing set toSelf(replaces previous implementation forBox<T>)
- Added implementations of
- 2022-06-27: Version 0.2.0
- Some more trait implementations (
AsRef,AsMut,Borrow,BorrowMut, andDisplay) have been added forOwned(andDebug::fmt's output is transparent now) Derefis now a supertrait ofIntoOwnedandIntoOwned::Ownedmust implementBorrow<<Self as Deref>::Target>
- Some more trait implementations (
- 2022-06-26: Version 0.1.0
- Initial release