pub enum ShapeRule {
Require {
keyword: String,
type_constraint: Option<TypeConstraint>,
children: Vec<ShapeRule>,
},
Optional {
keyword: String,
type_constraint: Option<TypeConstraint>,
default: Option<SExpr>,
children: Vec<ShapeRule>,
},
MaxDepth(u32),
}Expand description
A single shape rule within a shape constraint (REQ-221).
Variants§
Require
A required keyword parameter.
Optional
An optional keyword parameter with an optional default value.
Fields
§
type_constraint: Option<TypeConstraint>MaxDepth(u32)
Maximum nesting depth for the message.
Trait Implementations§
impl Eq for ShapeRule
impl StructuralPartialEq for ShapeRule
Auto Trait Implementations§
impl Forget for ShapeRule
impl Freeze for ShapeRulewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<SExpr>: Freeze,
*const ArcInner<Node> is !null: Freeze,
PhantomData<ArcInner<Node>>: Freeze,
PhantomData<ShapeRule>: Freeze,
impl Move for ShapeRule
impl RefUnwindSafe for ShapeRule
impl Send for ShapeRule
impl Sync for ShapeRule
impl Unpin for ShapeRule
impl UnsafeUnpin for ShapeRulewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<SExpr>: UnsafeUnpin,
*const ArcInner<Node> is !null: UnsafeUnpin,
PhantomData<ArcInner<Node>>: UnsafeUnpin,
PhantomData<ShapeRule>: UnsafeUnpin,
impl UnwindSafe for ShapeRule
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