[−][src]Struct reffers::rc::Strong
A strong reference without access to the inner value.
To get immutable/mutable access, you need to use the get_ref/get_refmut functions to create Ref or RefMut references.
The inner value cannot be dropped while Strong, Ref or RefMut references exist.
Methods
impl<T, M: BitMask> Strong<T, M>
[src]
impl<M: BitMask> Strong<str, M>
[src]
impl<T, M: BitMask> Strong<[T], M>
[src]
pub fn new_slice<I: ExactSizeIterator<Item = T>>(t: I) -> Self
[src]
Creates a new slice reference from an iterator.
impl<T: ?Sized + Repr, M: BitMask> Strong<T, M>
[src]
pub fn get_mut(&self) -> RefMut<T, M>
[src]
Renamed to get_refmut
Returns a new RefMut, or panics if this is not possible
Will panic in case a RefMut or Ref is currently held
pub fn try_get_mut(&self) -> Result<RefMut<T, M>, State>
[src]
Renamed to try_get_refmut
Returns a new RefMut, or panics if this is not possible
Will return an error in case a RefMut or Ref is currently held
pub fn get_refmut(&self) -> RefMut<T, M>
[src]
Returns a new RefMut, or panics if this is not possible
Will panic in case a RefMut or Ref is currently held
pub fn try_get_refmut(&self) -> Result<RefMut<T, M>, State>
[src]
Returns a new RefMut, or panics if this is not possible
Will return an error in case a RefMut or Ref is currently held
pub fn get_ref(&self) -> Ref<T, M>
[src]
Returns a new Ref, or panics if this is not possible
Will panic in case a RefMut is currently held, or there are no more Refs available
pub fn try_get_ref(&self) -> Result<Ref<T, M>, State>
[src]
Returns a new Ref, or returns an error if there are no such references available
Will return an error in case a RefMut is currently held, or there are no more Refs available
pub fn get(&self) -> Ref<T, M>
[src]
Renamed to get_ref
Returns a new Ref, or panics if this is not possible
Will panic in case a RefMut is currently held, or there are no more Refs available
pub fn try_get(&self) -> Result<Ref<T, M>, State>
[src]
Renamed to try_get_ref
Returns a new Ref, or returns an error if there are no such references available
Will return an error in case a RefMut is currently held, or there are no more Refs available
pub fn get_weak(&self) -> Weak<T, M>
[src]
Returns a new Weak reference, or panics if there are no such references available
pub fn get_strong(&self) -> Strong<T, M>
[src]
Returns a new Strong reference, or panics if there are no such references available
pub fn try_get_weak(&self) -> Result<Weak<T, M>, State>
[src]
Returns a new Weak reference, or returns an error if there are no such references available
pub fn try_get_strong(&self) -> Result<Strong<T, M>, State>
[src]
Returns a new Strong reference, or returns an error if there are no such references available
pub fn state(&self) -> State
[src]
Returns the current state
pub fn unpoison(&self) -> Result<(), State>
[src]
Reverts poisoning
Poisoning happens when a RefMut is dropped during a panic.
Trait Implementations
impl<T: ?Sized + Repr, M: BitMask> Drop for Strong<T, M>
[src]
impl<T, M: BitMask> From<T> for Strong<T, M>
[src]
impl<T: ?Sized + Repr, M: BitMask> Clone for Strong<T, M>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Default, M: BitMask> Default for Strong<T, M>
[src]
impl<T: Debug + ?Sized + Repr, M: Debug + BitMask> Debug for Strong<T, M> where
T::Store: Debug,
[src]
T::Store: Debug,
Auto Trait Implementations
impl<T, M = u32> !Send for Strong<T, M>
impl<T, M = u32> !Sync for Strong<T, M>
impl<T: ?Sized, M> Unpin for Strong<T, M> where
M: Unpin,
T: Unpin,
<T as Repr>::Store: Unpin,
M: Unpin,
T: Unpin,
<T as Repr>::Store: Unpin,
impl<T, M = u32> !UnwindSafe for Strong<T, M>
impl<T, M = u32> !RefUnwindSafe for Strong<T, M>
Blanket Implementations
impl<T> Repr for T
[src]
type Store = T
fn convert(*mut T) -> *mut T
[src]
unsafe fn deallocate_mem<M>(&mut UnsafeCell<RCell<<T as Repr>::Store, M>>) where
M: BitMask,
[src]
M: BitMask,
impl<T> Repr for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> From<!> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,