Trait IntoOwned

Source
pub trait IntoOwned {
    // Required method
    fn into_owned(self) -> Self;
}
Expand description

Into owned.

Note the difference between this and ToOwned: here self is moved rather than referenced. This allows implementations to avoid allocation when unnecessary. For example, if we are already owned then we can return self.

Required Methods§

Source

fn into_owned(self) -> Self

Into owned.

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.

Implementors§

Source§

impl IntoOwned for FosterByteString

Available on crate feature byte_string only.
Source§

impl IntoOwned for FosterByteStringVector

Available on crate feature byte_string only.
Source§

impl IntoOwned for FosterString

Source§

impl IntoOwned for FosterStringVector