Closed desaikd closed 2 years ago
Changes with commit https://github.com/amzn/ion-schema-rust/pull/67/commits/1a811a9f7165c37222e958457dc38e885bffaeb2:
IslLength
and IslOccurs
Range
directly to create container_length
constraint
programmaticallyusize
for IntegerNonNegative
Range
From<usize>
implementation instead of TryFrom<AnyInt>
for creating non
negative integer rangesoptional()
and required()
methods now return Range instead of
IonSchemaResult<Range>
as these ranges will always be successfully
created
Issue #9 #10
Description of changes: This PR works on adding implementation of
container_length
constraint.Grammar:
Ion Schema specification: https://amzn.github.io/ion-schema/docs/spec.html#container_length
List of changes:
IslConstraint::ContainerLength
andConstraint::ContainerLength
enum variantsIslLength
that can be used bybyte_length
,codepoint_length
andcontainer_length
constraintscontainer_length
constraint inContainerLengthConstraint
implementationViolationCode::InvalidLength
for any invalid length for constraints likecodepoint_length
,byte_length
,container_length
container_length
constraintTests: added unit tests for
container_length
implementation.container_length
constraintcontainer_length
constraintcontainer_length
constraint