pub struct Choice<RS = Resolved>where
RS: ResolveState,{ /* private fields */ }
Implementations§
source§impl<RS> Choice<RS>where
RS: ResolveState,
impl<RS> Choice<RS>where RS: ResolveState,
pub fn from_variants( variants: impl Iterator<Item = ChoiceVariant<RS>> ) -> Choice<RS>
pub fn with_extension_after(self, extension_after: usize) -> Choice<RS>
pub fn with_maybe_extension_after( self, extension_after: Option<usize> ) -> Choice<RS>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn variants(&self) -> impl Iterator<Item = &ChoiceVariant<RS>>
pub fn is_extensible(&self) -> bool
pub fn extension_after_index(&self) -> Option<usize>
source§impl Choice<Unresolved>
impl Choice<Unresolved>
pub fn try_resolve<R>(&self, resolver: &R) -> Result<Choice<Resolved>, Error>where R: Resolver<<Resolved as ResolveState>::SizeType> + Resolver<<Resolved as ResolveState>::RangeType> + Resolver<<Resolved as ResolveState>::ConstType> + Resolver<Type<Unresolved>>,
Trait Implementations§
source§impl<RS> From<Vec<ChoiceVariant<RS>, Global>> for Choice<RS>where
RS: ResolveState,
impl<RS> From<Vec<ChoiceVariant<RS>, Global>> for Choice<RS>where RS: ResolveState,
source§impl<RS> PartialEq<Choice<RS>> for Choice<RS>where
RS: PartialEq<RS> + ResolveState,
impl<RS> PartialEq<Choice<RS>> for Choice<RS>where RS: PartialEq<RS> + ResolveState,
source§impl<RS> PartialOrd<Choice<RS>> for Choice<RS>where
RS: PartialOrd<RS> + ResolveState,
impl<RS> PartialOrd<Choice<RS>> for Choice<RS>where RS: PartialOrd<RS> + ResolveState,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<RS> StructuralPartialEq for Choice<RS>where RS: ResolveState,
Auto Trait Implementations§
impl<RS> RefUnwindSafe for Choice<RS>where <RS as ResolveState>::ConstType: RefUnwindSafe, <RS as ResolveState>::RangeType: RefUnwindSafe, <RS as ResolveState>::SizeType: RefUnwindSafe,
impl<RS> Send for Choice<RS>where <RS as ResolveState>::ConstType: Send, <RS as ResolveState>::RangeType: Send, <RS as ResolveState>::SizeType: Send,
impl<RS> Sync for Choice<RS>where <RS as ResolveState>::ConstType: Sync, <RS as ResolveState>::RangeType: Sync, <RS as ResolveState>::SizeType: Sync,
impl<RS> Unpin for Choice<RS>where <RS as ResolveState>::ConstType: Unpin, <RS as ResolveState>::RangeType: Unpin, <RS as ResolveState>::SizeType: Unpin,
impl<RS> UnwindSafe for Choice<RS>where <RS as ResolveState>::ConstType: UnwindSafe, <RS as ResolveState>::RangeType: UnwindSafe, <RS as ResolveState>::SizeType: 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