Struct lateinit::LateInit
[−]
[src]
pub struct LateInit<T>(_);
The primary type for this crate. Initialize before use.
Methods
impl<T> LateInit<T>
[src]
pub const fn new() -> Self
[src]
Create a new LateInit.
pub unsafe fn init(&self, value: T)
[src]
Assign a value. Panics if called more than once.
impl<T: Clone> LateInit<T>
[src]
pub fn clone(&self) -> T
[src]
Clone contained value. Panics in debug profile if called before initialization.
Note that Clone
is not implemented because LateInit
doesn't
support mutation, so clone_from
is impossible.
Trait Implementations
impl<T> Sync for LateInit<T>
[src]
impl<T> !Send for LateInit<T>
[src]
impl<T> Deref for LateInit<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
Deref to contained value. Panics in debug if called before initialization.
impl<T> AsRef<T> for LateInit<T>
[src]
impl<T: Debug> Debug for LateInit<T>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError>
[src]
Delegates to Debug
implementation on contained value. This is a checked access.