pub struct UnsafeReadOnlyCell<T: Send> { /* private fields */ }

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
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.

Returns the status of instance.

Return

True - is locked or false.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.