Struct cell_rc::CellOptWeak
[−]
[src]
pub struct CellOptWeak<T: ?Sized> { /* fields omitted */ }
Wrapper around Option<Weak<T>>
Methods
impl<T: ?Sized> CellOptWeak<T>
[src]
fn new(weak: Option<Weak<T>>) -> Self
fn into_inner(self) -> Option<Weak<T>>
fn get(&self) -> Option<Weak<T>>
fn set(&self, rc: Option<Weak<T>>) -> Option<Weak<T>>
fn is_some(&self) -> bool
fn is_none(&self) -> bool
fn upgrade(&self) -> Option<Option<Rc<T>>>
Returns None
if the wrapped Option<Weak<T>>
is None
, Some(None)
if there aren't strong references left, or Some(Some(..))
otherwise.
fn upgrade_cell(&self) -> Option<CellOptRc<T>>
Trait Implementations
impl<T: Debug + ?Sized> Debug for CellOptWeak<T>
[src]
impl<T: Default + ?Sized> Default for CellOptWeak<T>
[src]
fn default() -> CellOptWeak<T>
Returns the "default value" for a type. Read more
impl<T: ?Sized> From<Option<Weak<T>>> for CellOptWeak<T>
[src]
impl<T: ?Sized> Clone for CellOptWeak<T>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more