pub enum SingleOrMultiValue<'a> {
Single(&'a ValType),
Multi(&'a [ValType]),
}
Expand description
A helper enum for representing either a single or multiple values.
Variants§
Implementations§
Trait Implementations§
Source§impl<'a> Clone for SingleOrMultiValue<'a>
impl<'a> Clone for SingleOrMultiValue<'a>
Source§fn clone(&self) -> SingleOrMultiValue<'a>
fn clone(&self) -> SingleOrMultiValue<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl PartialEq<[ValType]> for SingleOrMultiValue<'_>
impl PartialEq<[ValType]> for SingleOrMultiValue<'_>
Source§impl<'a> PartialEq<SingleOrMultiValue<'a>> for &'a [ValType]
impl<'a> PartialEq<SingleOrMultiValue<'a>> for &'a [ValType]
Auto Trait Implementations§
impl<'a> Freeze for SingleOrMultiValue<'a>
impl<'a> RefUnwindSafe for SingleOrMultiValue<'a>
impl<'a> Send for SingleOrMultiValue<'a>
impl<'a> Sync for SingleOrMultiValue<'a>
impl<'a> Unpin for SingleOrMultiValue<'a>
impl<'a> UnwindSafe for SingleOrMultiValue<'a>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointee for T
impl<T> Pointee for T
Source§impl<T> Upcastable for T
impl<T> Upcastable for T
Source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
Source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref