[][src]Trait abi_stable::std_types::cow::BorrowOwned

pub trait BorrowOwned<'a>: 'a + ToOwned {
    type ROwned;
    type RBorrowed: 'a + Copy;
    fn r_borrow(this: &'a Self::ROwned) -> Self::RBorrowed;
fn r_to_owned(this: Self::RBorrowed) -> Self::ROwned;
fn deref_borrowed(this: &Self::RBorrowed) -> &Self;
fn deref_owned(this: &Self::ROwned) -> &Self;
fn from_cow_borrow(this: &'a Self) -> Self::RBorrowed;
fn from_cow_owned(this: Self::Owned) -> Self::ROwned;
fn into_cow_borrow(this: Self::RBorrowed) -> &'a Self;
fn into_cow_owned(this: Self::ROwned) -> Self::Owned; }

The main bound of RCow<_>.

All the methods in this trait convert the parameter to the return type.

Associated Types

type ROwned

type RBorrowed: 'a + Copy

Loading content...

Required methods

fn r_borrow(this: &'a Self::ROwned) -> Self::RBorrowed

fn r_to_owned(this: Self::RBorrowed) -> Self::ROwned

fn deref_borrowed(this: &Self::RBorrowed) -> &Self

fn deref_owned(this: &Self::ROwned) -> &Self

fn from_cow_borrow(this: &'a Self) -> Self::RBorrowed

fn from_cow_owned(this: Self::Owned) -> Self::ROwned

fn into_cow_borrow(this: Self::RBorrowed) -> &'a Self

fn into_cow_owned(this: Self::ROwned) -> Self::Owned

Loading content...

Implementations on Foreign Types

impl<'a> BorrowOwned<'a> for str[src]

type ROwned = RString

type RBorrowed = RStr<'a>

impl<'a, T: 'a> BorrowOwned<'a> for [T] where
    T: Clone
[src]

type ROwned = RVec<T>

type RBorrowed = RSlice<'a, T>

Loading content...

Implementors

impl<'a, T: 'a> BorrowOwned<'a> for T where
    T: Clone
[src]

type ROwned = T

type RBorrowed = &'a T

Loading content...