ToBoxed

Trait ToBoxed 

Source
pub trait ToBoxed: ToOwned {
    // Required method
    fn to_boxed(o: Self::Owned) -> Box<Self>;
}
Expand description

Converts the owned version of self into boxed data.

This trait should not be used directly but instead through the .into_boxed() method on Cow.

Required Methods§

Source

fn to_boxed(o: Self::Owned) -> Box<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToBoxed for str

Source§

fn to_boxed(o: Self::Owned) -> Box<Self>

Source§

impl ToBoxed for CStr

Source§

fn to_boxed(o: Self::Owned) -> Box<Self>

Source§

impl ToBoxed for OsStr

Source§

fn to_boxed(o: Self::Owned) -> Box<Self>

Source§

impl ToBoxed for Path

Source§

fn to_boxed(o: Self::Owned) -> Box<Self>

Source§

impl<T: Clone> ToBoxed for [T]

Source§

fn to_boxed(o: Self::Owned) -> Box<Self>

Implementors§