Skip to main content

UnsafeCellInit

Trait UnsafeCellInit 

Source
pub trait UnsafeCellInit<T> {
    // Required method
    fn init<I>(value: I) -> impl Init<Self>
       where I: Init<T>;
}
Expand description

An extension trait for retrofitting UnsafeCell with an initializer.

Required Methods§

Source

fn init<I>(value: I) -> impl Init<Self>
where I: Init<T>,

Create a new in-place initializer for UnsafeCell by using the given initializer for the value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> UnsafeCellInit<T> for UnsafeCell<T>

Source§

fn init<I>(value: I) -> impl Init<UnsafeCell<T>>
where I: Init<T>,

Implementors§