113 113 | Ok(v) => Ok((k, v)),
|
114 114 | Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
|
115 115 | }
|
116 116 | })
|
117 117 | .collect();
|
118 118 | let hm = res?;
|
119 119 | Ok(Self(hm))
|
120 120 | }
|
121 121 | }
|
122 122 | }
|
123 123 | pub(crate) mod list_of_length_pattern_string_unconstrained {
|
124 124 |
|
125 125 | #[derive(Debug, Clone)]
|
126 126 | pub(crate) struct ListOfLengthPatternStringUnconstrained(
|
127 127 | pub(crate) std::vec::Vec<::std::string::String>,
|
128 128 | );
|
129 129 |
|
130 130 | impl From<ListOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained> {
|
131 131 | fn from(value: ListOfLengthPatternStringUnconstrained) -> Self {
|
132 132 | Self::Unconstrained(value)
|
133 133 | }
|
134 134 | }
|
135 135 | impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
|
136 136 | type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
|
137 137 | fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
|
138 138 | let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
|
139 139 | .0
|
140 140 | .into_iter()
|
141 141 | .enumerate()
|
142 142 | .map(|(idx, inner)| {
|
143 - | inner.try_into().map_err(|inner_violation| (idx, inner_violation))
|
143 + | inner.try_into()
|
144 + | .map_err(|inner_violation| (idx, inner_violation))
|
144 145 | })
|
145 146 | .collect();
|
146 147 | let inner = res
|
147 148 |
|
148 149 | .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
149 150 | Ok(Self(inner))
|
150 151 | }
|
151 152 | }
|
152 153 | }
|
153 154 | pub(crate) mod map_of_length_pattern_string_unconstrained {
|
154 155 |
|
155 156 | #[derive(Debug, Clone)]
|
156 157 | pub(crate) struct MapOfLengthPatternStringUnconstrained(
|
157 158 | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
158 159 | );
|
159 160 |
|
160 161 | impl From<MapOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained> {
|
161 162 | fn from(value: MapOfLengthPatternStringUnconstrained) -> Self {
|
162 163 | Self::Unconstrained(value)
|
163 164 | }
|
164 165 | }
|
165 166 | impl std::convert::TryFrom<MapOfLengthPatternStringUnconstrained> for crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained {
|
166 167 | type Error = crate::model::map_of_length_pattern_string_internal::ConstraintViolation;
|
167 168 | fn try_from(value: MapOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
|
168 169 | let res: Result<::std::collections::HashMap<crate::model::LengthPatternString, crate::model::LengthPatternString>, Self::Error> = value.0
|
169 170 | .into_iter()
|
170 171 | .map(|(k, v)| {
|
171 172 | let k: crate::model::LengthPatternString = k.try_into().map_err(Self::Error::Key)?;
|
172 173 |
|
173 174 | match crate::model::LengthPatternString::try_from(v) {
|
629 630 | }
|
630 631 | }
|
631 632 | }
|
632 633 | pub(crate) mod recursive_list_unconstrained {
|
633 634 |
|
634 635 | #[derive(Debug, Clone)]
|
635 636 | pub(crate) struct RecursiveListUnconstrained(
|
636 637 | pub(crate)
|
637 638 | std::vec::Vec<crate::model::recursive_shapes_input_output_nested1_internal::Builder>,
|
638 639 | );
|
639 640 |
|
640 641 | impl From<RecursiveListUnconstrained>
|
641 642 | for crate::constrained::MaybeConstrained<
|
642 643 | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
643 644 | >
|
644 645 | {
|
645 646 | fn from(value: RecursiveListUnconstrained) -> Self {
|
646 647 | Self::Unconstrained(value)
|
647 648 | }
|
648 649 | }
|
649 650 | impl std::convert::TryFrom<RecursiveListUnconstrained>
|
650 651 | for crate::constrained::recursive_list_constrained::RecursiveListConstrained
|
651 652 | {
|
652 653 | type Error = crate::model::recursive_list_internal::ConstraintViolation;
|
653 654 | fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
|
654 655 | let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
|
655 656 | .0
|
656 657 | .into_iter()
|
657 658 | .enumerate()
|
658 659 | .map(|(idx, inner)| {
|
659 - | inner.try_into().map_err(|inner_violation| (idx, inner_violation))
|
660 + | inner.try_into()
|
661 + | .map_err(|inner_violation| (idx, inner_violation))
|
660 662 | })
|
661 663 | .collect();
|
662 664 | let inner =
|
663 665 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
664 666 | Ok(Self(inner))
|
665 667 | }
|
666 668 | }
|
667 669 | }
|
668 670 | pub(crate) mod length_set_of_pattern_string_unconstrained {
|
669 671 |
|
670 672 | #[derive(Debug, Clone)]
|
671 673 | pub(crate) struct LengthSetOfPatternStringUnconstrained(
|
672 674 | pub(crate) std::vec::Vec<::std::string::String>,
|
673 675 | );
|
674 676 |
|
675 677 | impl From<LengthSetOfPatternStringUnconstrained>
|
676 678 | for crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>
|
677 679 | {
|
678 680 | fn from(value: LengthSetOfPatternStringUnconstrained) -> Self {
|
679 681 | Self::Unconstrained(value)
|
680 682 | }
|
681 683 | }
|
682 684 | impl std::convert::TryFrom<LengthSetOfPatternStringUnconstrained>
|
683 685 | for crate::model::LengthSetOfPatternString
|
684 686 | {
|
685 687 | type Error = crate::model::length_set_of_pattern_string_internal::ConstraintViolation;
|
686 688 | fn try_from(value: LengthSetOfPatternStringUnconstrained) -> Result<Self, Self::Error> {
|
687 689 | let res: Result<
|
688 690 | ::std::vec::Vec<crate::model::PatternString>,
|
689 691 | (
|