Skip to main content

UnsizedCopyFrom

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

Available on crate feature std only.
Source§

type Source = str

Source§

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

Source§

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

Available on crate feature std only.
Source§

type Source = [T]

Source§

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

Source§

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

Available on crate feature std only.
Source§

type Source = T

Source§

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

Source§

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

Available on crate feature std only.
Source§

type Source = T

Source§

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

Source§

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

Available on crate feature std only.
Source§

type Source = T

Source§

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

Implementors§