Skip to main content

ToRefOwned

Trait ToRefOwned 

Source
pub trait ToRefOwned {
    type Owned: Borrow<Self>;

    // Required method
    fn to_ref_owned(&mut self) -> Self::Owned;
}
Expand description

Duplicate an object without deep copy, but to only add the refcount, for php refcount struct.

Required Associated Types§

Source

type Owned: Borrow<Self>

The resulting type after obtaining ownership.

Required Methods§

Source

fn to_ref_owned(&mut self) -> Self::Owned

Creates owned data from borrowed data, by increasing refcount.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§