Trait UnsizedCopyFrom

Source
pub trait UnsizedCopyFrom: Sized {
    type Source: ?Sized + UnsizedCopy;

    // Required method
    fn unsized_copy_from(value: &Self::Source) -> Self;
}
Expand description

A container type that can be copied into.

Required Associated Types§

Source

type Source: ?Sized + UnsizedCopy

The source type to copy from.

Required Methods§

Source

fn unsized_copy_from(value: &Self::Source) -> Self

Create a new Self by copying the given value.

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 UnsizedCopyFrom for String

Source§

type Source = str

Source§

fn unsized_copy_from(value: &Self::Source) -> Self

Source§

impl<T: UnsizedCopy> UnsizedCopyFrom for Vec<T>

Source§

type Source = [T]

Source§

fn unsized_copy_from(value: &Self::Source) -> Self

Source§

impl<T: ?Sized + UnsizedCopy> UnsizedCopyFrom for Box<T>

Source§

type Source = T

Source§

fn unsized_copy_from(value: &Self::Source) -> Self

Source§

impl<T: ?Sized + UnsizedCopy> UnsizedCopyFrom for Rc<T>

Source§

type Source = T

Source§

fn unsized_copy_from(value: &Self::Source) -> Self

Source§

impl<T: ?Sized + UnsizedCopy> UnsizedCopyFrom for Arc<T>

Source§

type Source = T

Source§

fn unsized_copy_from(value: &Self::Source) -> Self

Implementors§