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 + |
|
145 + | .map_err(|inner_violation| (idx, inner_violation))
|
144 146 | })
|
145 147 | .collect();
|
146 148 | let inner = res
|
147 149 |
|
148 150 | .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
149 151 | Ok(Self(inner))
|
150 152 | }
|
151 153 | }
|
152 154 | }
|
153 155 | pub(crate) mod map_of_length_pattern_string_unconstrained {
|
154 156 |
|
155 157 | #[derive(Debug, Clone)]
|
156 158 | pub(crate) struct MapOfLengthPatternStringUnconstrained(
|
157 159 | pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
|
158 160 | );
|
159 161 |
|
160 162 | impl From<MapOfLengthPatternStringUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained> {
|
161 163 | fn from(value: MapOfLengthPatternStringUnconstrained) -> Self {
|
162 164 | Self::Unconstrained(value)
|
163 165 | }
|
164 166 | }
|
165 167 | impl std::convert::TryFrom<MapOfLengthPatternStringUnconstrained> for crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained {
|
166 168 | type Error = crate::model::map_of_length_pattern_string_internal::ConstraintViolation;
|
167 169 | fn try_from(value: MapOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
|
168 170 | let res: Result<::std::collections::HashMap<crate::model::LengthPatternString, crate::model::LengthPatternString>, Self::Error> = value.0
|
169 171 | .into_iter()
|
170 172 | .map(|(k, v)| {
|
171 173 | let k: crate::model::LengthPatternString = k.try_into().map_err(Self::Error::Key)?;
|
172 174 |
|
173 175 | match crate::model::LengthPatternString::try_from(v) {
|
629 631 | }
|
630 632 | }
|
631 633 | }
|
632 634 | pub(crate) mod recursive_list_unconstrained {
|
633 635 |
|
634 636 | #[derive(Debug, Clone)]
|
635 637 | pub(crate) struct RecursiveListUnconstrained(
|
636 638 | pub(crate)
|
637 639 | std::vec::Vec<crate::model::recursive_shapes_input_output_nested1_internal::Builder>,
|
638 640 | );
|
639 641 |
|
640 642 | impl From<RecursiveListUnconstrained>
|
641 643 | for crate::constrained::MaybeConstrained<
|
642 644 | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
643 645 | >
|
644 646 | {
|
645 647 | fn from(value: RecursiveListUnconstrained) -> Self {
|
646 648 | Self::Unconstrained(value)
|
647 649 | }
|
648 650 | }
|
649 651 | impl std::convert::TryFrom<RecursiveListUnconstrained>
|
650 652 | for crate::constrained::recursive_list_constrained::RecursiveListConstrained
|
651 653 | {
|
652 654 | type Error = crate::model::recursive_list_internal::ConstraintViolation;
|
653 655 | fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
|
654 656 | let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
|
655 657 | .0
|
656 658 | .into_iter()
|
657 659 | .enumerate()
|
658 660 | .map(|(idx, inner)| {
|
659 - | inner.try_into().map_err(|inner_violation| (idx, inner_violation))
|
661 + | inner.try_into()
|
662 + |
|
663 + | .map_err(|inner_violation| (idx, inner_violation))
|
660 664 | })
|
661 665 | .collect();
|
662 666 | let inner =
|
663 667 | res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
|
664 668 | Ok(Self(inner))
|
665 669 | }
|
666 670 | }
|
667 671 | }
|
668 672 | pub(crate) mod length_set_of_pattern_string_unconstrained {
|
669 673 |
|
670 674 | #[derive(Debug, Clone)]
|
671 675 | pub(crate) struct LengthSetOfPatternStringUnconstrained(
|
672 676 | pub(crate) std::vec::Vec<::std::string::String>,
|
673 677 | );
|
674 678 |
|
675 679 | impl From<LengthSetOfPatternStringUnconstrained>
|
676 680 | for crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>
|
677 681 | {
|
678 682 | fn from(value: LengthSetOfPatternStringUnconstrained) -> Self {
|
679 683 | Self::Unconstrained(value)
|
680 684 | }
|
681 685 | }
|
682 686 | impl std::convert::TryFrom<LengthSetOfPatternStringUnconstrained>
|
683 687 | for crate::model::LengthSetOfPatternString
|
684 688 | {
|
685 689 | type Error = crate::model::length_set_of_pattern_string_internal::ConstraintViolation;
|
686 690 | fn try_from(value: LengthSetOfPatternStringUnconstrained) -> Result<Self, Self::Error> {
|
687 691 | let res: Result<
|
688 692 | ::std::vec::Vec<crate::model::PatternString>,
|
689 693 | (
|