Enum kaspa_utils::refs::Refs
source · 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> RefUnwindSafe for Refs<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for Refs<'a, T>
impl<'a, T> !Sync for Refs<'a, T>
impl<'a, T> Unpin for Refs<'a, T>
impl<'a, T> UnwindSafe for Refs<'a, T>where
T: UnwindSafe + RefUnwindSafe,
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<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.