pub enum Ref<T: 'static> {
Strong(Strong<T>),
Weak(Weak<T>),
}
Variants§
Implementations§
Source§impl<T: 'static> Ref<T>
impl<T: 'static> Ref<T>
pub fn try_as_ref(&self, rl: &Reading) -> Option<&T>
pub fn try_mut(&mut self, wl: &mut Writing) -> Option<&mut T>
pub fn try_map<F, U>(&self, rl: &Reading, f: F) -> Option<Ref<U>>
pub fn is_weak(&self) -> bool
pub fn is_strong(&self) -> bool
pub fn is_valid(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Ref<T>
impl<T> !RefUnwindSafe for Ref<T>
impl<T> !Send for Ref<T>
impl<T> !Sync for Ref<T>
impl<T> Unpin for Ref<T>
impl<T> !UnwindSafe for Ref<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more