borrow_framework

Trait Borrow

Source
pub trait Borrow<'a, T>
where T: for<'b> BorrowHkt<'b>,
{ // Required method fn borrow<'b>(&'a self) -> Borrowed<'b, T> where 'a: 'b; }
Expand description

Flexible borrowing trait.

This is similar to std::borrow::Borrow but allows non-reference types to be used.

Required Methods§

Source

fn borrow<'b>(&'a self) -> Borrowed<'b, T>
where 'a: 'b,

Create a borrowed version of this type.

Implementors§

Source§

impl<'a, T> Borrow<'a, BorrowCow<T>> for Cow<'a, T>
where T: Cowable, CowableBorrowed<'a, T>: Borrow<'a, T::BorrowHkt>, CowableOwned<T>: Borrow<'a, T::BorrowHkt>,