pub struct Item<S: State = Parsed> {
pub pattern: Pattern<S>,
pub repeat: RangeInclusive<usize>,
pub optional: bool,
}Expand description
Part of a pattern with its modifiers: how many times it is repeated, and whether it is optional.
Fields§
§pattern: Pattern<S>What is repeated or left out.
repeat: RangeInclusive<usize>How many times it is repeated: a fixed number, or a random one from a range.
optional: boolWhether it is left out half of the time.
Implementations§
Trait Implementations§
impl<S: PartialEq + State> StructuralPartialEq for Item<S>
Auto Trait Implementations§
impl<S> Forget for Item<S>
impl<S> Freeze for Item<S>
impl<S> Move for Item<S>
impl<S> RefUnwindSafe for Item<S>where
Pattern<S>: RefUnwindSafe,
impl<S> Send for Item<S>
impl<S> Sync for Item<S>
impl<S> Unpin for Item<S>
impl<S> UnsafeUnpin for Item<S>where
Pattern<S>: UnsafeUnpin,
impl<S> UnwindSafe for Item<S>where
Pattern<S>: 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