pub struct GenSpec {
pub format: InputFormat,
pub bounds: BTreeMap<VarKey, VarBounds>,
}Expand description
The merged generation spec: input format plus constraint bounds.
Fields§
§format: InputFormatRecognized input-format lines.
bounds: BTreeMap<VarKey, VarBounds>Constraint bounds (scalar and element keys only).
Implementations§
Source§impl GenSpec
impl GenSpec
Sourcepub fn parse(
input_format: &str,
constraint_lines: &[String],
) -> Result<Self, SpecError>
pub fn parse( input_format: &str, constraint_lines: &[String], ) -> Result<Self, SpecError>
Builds a spec from input-format text and raw constraint lines.
§Errors
SpecError::Unsupported when the format is unrecognized, a
constraint line looks like a constraint but cannot be parsed,
required bounds are missing, or array length variables are not
declared scalars.
Trait Implementations§
Auto Trait Implementations§
impl Forget for GenSpec
impl Freeze for GenSpecwhere
*const u8 is !null: Freeze,
PhantomData<FormatLine>: Freeze,
*const LeafNode<String, SetValZST> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, SetValZST)>>: Freeze,
*const LeafNode<VarKey, VarBounds> is !null: Freeze,
PhantomData<Box<(VarKey, VarBounds)>>: Freeze,
impl Move for GenSpec
impl RefUnwindSafe for GenSpec
impl Send for GenSpec
impl Sync for GenSpec
impl Unpin for GenSpec
impl UnsafeUnpin for GenSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<FormatLine>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
*const LeafNode<VarKey, VarBounds> is !null: UnsafeUnpin,
PhantomData<Box<(VarKey, VarBounds)>>: UnsafeUnpin,
impl UnwindSafe for GenSpecwhere
RawVecInner: UnwindSafe,
BTreeMap<String, SetValZST>: UnwindSafe,
BTreeMap<VarKey, VarBounds>: 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