/// A simpler version of Cow that can only borrow values, not convert them into owned.
pubenumBorrowedOrOwned<'a, T> {
Borrowed(&'a T),
Owned(T),}impl<'a, T>BorrowedOrOwned<'a, T>{/// Borrows this value with a lifetime that matches self
pubfnborrow_self(&'aself)->&'a T{matchself{BorrowedOrOwned::Borrowed(reference)=> reference,BorrowedOrOwned::Owned(owned)=> owned,}}}