Enum RepetitionRange

pub enum RepetitionRange

A range repetition operator.

Variants

Exactly(u32)

{m}

AtLeast(u32)

{m,}

Bounded(u32, u32)

{m,n}

Implementations

impl RepetitionRange

fn is_valid(&self) -> bool

Returns true if and only if this repetition range is valid.

The only case where a repetition range is invalid is if it is bounded and its start is greater than its end.

Trait Implementations

impl Clone for RepetitionRange

fn clone(&self) -> Self

impl Debug for RepetitionRange

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for RepetitionRange

impl PartialEq for RepetitionRange

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for RepetitionRange

Auto Trait Implementations

impl Freeze for RepetitionRange

impl RefUnwindSafe for RepetitionRange

impl Send for RepetitionRange

impl Sync for RepetitionRange

impl Unpin for RepetitionRange

impl UnsafeUnpin for RepetitionRange

impl UnwindSafe for RepetitionRange

Blanket Implementations

impl<T> Any for RepetitionRange where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for RepetitionRange where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for RepetitionRange where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for RepetitionRange where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for RepetitionRange

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for RepetitionRange where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for RepetitionRange where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for RepetitionRange where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for RepetitionRange where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>