pub struct RepeatBounds { /* private fields */ }Expand description
Valid bounds for a repetition node.
Implementations§
Source§impl RepeatBounds
impl RepeatBounds
Sourcepub fn new(min: usize, max: Option<usize>) -> Result<Self, IrError>
pub fn new(min: usize, max: Option<usize>) -> Result<Self, IrError>
Creates repetition bounds, rejecting a finite maximum below min.
use sim_lib_pattern::RepeatBounds;
let error = RepeatBounds::new(4, Some(3)).unwrap_err();
assert_eq!(
error.to_string(),
"invalid repeat bounds: minimum 4 exceeds maximum 3"
);Trait Implementations§
Source§impl Clone for RepeatBounds
impl Clone for RepeatBounds
Source§fn clone(&self) -> RepeatBounds
fn clone(&self) -> RepeatBounds
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RepeatBounds
Source§impl Debug for RepeatBounds
impl Debug for RepeatBounds
impl Eq for RepeatBounds
Source§impl PartialEq for RepeatBounds
impl PartialEq for RepeatBounds
impl StructuralPartialEq for RepeatBounds
Auto Trait Implementations§
impl Freeze for RepeatBounds
impl RefUnwindSafe for RepeatBounds
impl Send for RepeatBounds
impl Sync for RepeatBounds
impl Unpin for RepeatBounds
impl UnsafeUnpin for RepeatBounds
impl UnwindSafe for RepeatBounds
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