Struct asn1rs_model::model::Choice
source · pub struct Choice<RS: ResolveState = Resolved> { /* private fields */ }
Implementations§
source§impl<RS: ResolveState> Choice<RS>
impl<RS: ResolveState> Choice<RS>
pub fn from_variants(variants: impl Iterator<Item = ChoiceVariant<RS>>) -> Self
pub fn with_extension_after(self, extension_after: usize) -> Self
pub fn with_maybe_extension_after(self, extension_after: Option<usize>) -> Self
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: Resolver<<Resolved as ResolveState>::SizeType> + Resolver<<Resolved as ResolveState>::RangeType> + Resolver<<Resolved as ResolveState>::ConstType> + Resolver<Type<Unresolved>>>( &self, resolver: &R ) -> Result<Choice<Resolved>, ResolveError>
Trait Implementations§
source§impl<RS: ResolveState> From<Vec<ChoiceVariant<RS>, Global>> for Choice<RS>
impl<RS: ResolveState> From<Vec<ChoiceVariant<RS>, Global>> for Choice<RS>
source§fn from(variants: Vec<ChoiceVariant<RS>>) -> Self
fn from(variants: Vec<ChoiceVariant<RS>>) -> Self
Converts to this type from the input type.
source§impl<RS: PartialEq + ResolveState> PartialEq<Choice<RS>> for Choice<RS>
impl<RS: PartialEq + ResolveState> PartialEq<Choice<RS>> for Choice<RS>
source§impl<RS: PartialOrd + ResolveState> PartialOrd<Choice<RS>> for Choice<RS>
impl<RS: PartialOrd + ResolveState> PartialOrd<Choice<RS>> for Choice<RS>
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: ResolveState> StructuralPartialEq for Choice<RS>
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