pub enum Refs<'a, T> {
Ref(&'a T),
Arc(Arc<T>),
Rc(Rc<T>),
Box(Box<T>),
}Expand description
Enum used to represent a concrete varying pointer type which only needs to be accessed by ref.
We avoid adding a Val(T) variant in order to keep the size of the enum minimal
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !Send for Refs<'a, T>
impl<'a, T> !Sync for Refs<'a, T>
impl<'a, T> Freeze for Refs<'a, T>
impl<'a, T> RefUnwindSafe for Refs<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for Refs<'a, T>
impl<'a, T> UnsafeUnpin for Refs<'a, T>
impl<'a, T> UnwindSafe for Refs<'a, T>where
T: RefUnwindSafe + UnwindSafe,
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
Source§impl<T, A> DynAccess<T> for A
impl<T, A> DynAccess<T> for A
Source§fn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
The equivalent of
Access::load.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<const N: usize, T> Serialize<N> for T
impl<const N: usize, T> Serialize<N> for T
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize
self using the provided Serializer.