pub enum Quantifier {
ZeroOrOne,
ZeroOrMore,
OneOrMore,
Exactly(usize),
Range(usize, usize),
}Expand description
A quantifier applied to a single term in a parent’s content expression.
Mirrors the ProseMirror content-expression grammar used by
@atlaskit/adf-schema. Range is used for the only known range case
(layoutSection permits 2–3 layoutColumn children); Exactly is used
for mediaSingle’s required media child.
Variants§
ZeroOrOne
? — zero or one (optional).
ZeroOrMore
* — zero or more.
OneOrMore
+ — one or more.
Exactly(usize)
{n} — exactly n.
Range(usize, usize)
{min,max} — between min and max inclusive.
Implementations§
Source§impl Quantifier
impl Quantifier
Sourcepub fn satisfied_by(&self, n: usize) -> bool
pub fn satisfied_by(&self, n: usize) -> bool
True when a count of n is acceptable for this quantifier.
Trait Implementations§
Source§impl Clone for Quantifier
impl Clone for Quantifier
Source§fn clone(&self) -> Quantifier
fn clone(&self) -> Quantifier
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 moreSource§impl Debug for Quantifier
impl Debug for Quantifier
Source§impl PartialEq for Quantifier
impl PartialEq for Quantifier
Source§fn eq(&self, other: &Quantifier) -> bool
fn eq(&self, other: &Quantifier) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Quantifier
impl StructuralPartialEq for Quantifier
Auto Trait Implementations§
impl Freeze for Quantifier
impl RefUnwindSafe for Quantifier
impl Send for Quantifier
impl Sync for Quantifier
impl Unpin for Quantifier
impl UnsafeUnpin for Quantifier
impl UnwindSafe for Quantifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.