[−][src]Struct malloc_array::init::Init
A safe wrapper to initialise potentially uninitialised data.
Implementations
impl<'a, T> Init<'a, T>
[src][−]
pub fn is_init(&self) -> bool
[src][−]
Has the value been set with put()
or assume_init()
yet?
pub unsafe fn assume_init(&mut self)
[src][−]
Assume the value has been initialised.
pub fn put(&mut self, value: T) -> &mut T
[src][−]
Initialise or reset the value and then return a mutable reference to it.
pub fn get(&self) -> Option<&T>
[src][−]
Get a reference to the value if it has been initialised.
pub fn get_mut(&mut self) -> Option<&mut T>
[src][−]
Get a mutable reference to the value if it has been initialised.
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Init<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> !Send for Init<'a, T>
impl<'a, T> !Sync for Init<'a, T>
impl<'a, T> Unpin for Init<'a, T>
impl<'a, T> UnwindSafe for Init<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,