Struct shared_slice::arc::WeakSlice
[-]
[+]
[src]
pub struct WeakSlice<T> { // some fields omitted }
A non-owning reference-counted slice type.
This is to ArcSlice
as std::sync::Weak
is to std::sync::Arc
, and
allows one to have cyclic references without stopping memory from
being deallocated.
Methods
impl<T> WeakSlice<T>
fn upgrade(&self) -> Option<ArcSlice<T>>
Attempt to upgrade self
to a strongly-counted ArcSlice
.
Returns None
if this is not possible (the data has already
been freed).