Struct syslog_rs::unsafe_cell::UnsafeReadOnlyCell [−][src]
pub struct UnsafeReadOnlyCell<T: Send> { /* fields omitted */ }
Implementations
Creates new unititialized Cell. A contained type must implement Send and maybe Sync
Arguments
title
- is a label which used to help in panic diagnostic.
Returns
- A UnsafeReadOnlyCell of type
. Never panics
Example
#[macro_use] extern crate lazy_static; use syslog_rs::UnsafeReadOnlyCell; struct Syslog{} lazy_static! { static ref SYSLOG: UnsafeReadOnlyCell<Syslog> = unsafe { UnsafeReadOnlyCell::new_uninitialized("a_label") }; }
Initializes the intance with provided data in init
and locks the
instance from modification. This function is unsafe and involves
atomic operation.
Return
Nothing, but will panic on attempt to call this function again.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for UnsafeReadOnlyCell<T>
impl<T> Send for UnsafeReadOnlyCell<T>
impl<T> Unpin for UnsafeReadOnlyCell<T> where
T: Unpin,
impl<T> UnwindSafe for UnsafeReadOnlyCell<T> where
T: UnwindSafe,