[−][src]Trait evmap::ShallowCopy
Types that implement this trait can be cheaply copied by (potentially) aliasing the data they contain.
Required methods
unsafe fn shallow_copy(&mut self) -> Self
Perform an aliasing copy of this value.
The use of this method is only safe if the values involved are never mutated, and only
one of the copies is dropped; the remaining copies must be forgotten with mem::forget
.
Implementations on Foreign Types
impl<T> ShallowCopy for Arc<T> where
T: ?Sized,
[src]
T: ?Sized,
unsafe fn shallow_copy(&mut self) -> Self
[src]
impl<T> ShallowCopy for Rc<T> where
T: ?Sized,
[src]
T: ?Sized,
unsafe fn shallow_copy(&mut self) -> Self
[src]
impl<T> ShallowCopy for Box<T> where
T: ?Sized,
[src]
T: ?Sized,
unsafe fn shallow_copy(&mut self) -> Self
[src]
impl ShallowCopy for String
[src]
unsafe fn shallow_copy(&mut self) -> Self
[src]
impl<T> ShallowCopy for Vec<T>
[src]
unsafe fn shallow_copy(&mut self) -> Self
[src]
impl<'a, T> ShallowCopy for &'a T where
T: ?Sized,
[src]
T: ?Sized,