Skip to main content

Cowable

Trait Cowable 

Source
pub trait Cowable {
    type BorrowHkt: for<'a> BorrowHkt<'a>;
    type Owned;
}
Expand description

Trait for types that can be used with Cow through a BorrowHkt.

This trait is automatically implemented for types that implement BorrowHkt if BorrowHkt::T implements ToOwned for all lifetimes.

Required Associated Types§

Source

type BorrowHkt: for<'a> BorrowHkt<'a>

The marker type implementing BorrowHkt.

Source

type Owned

The owned type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B, O> Cowable for B
where B: for<'a> BorrowHkt<'a>, for<'a> <B as BorrowHkt<'a>>::T: ToOwned<Owned = O>,