Lines Matching refs:Box
57 fn record_fields(&self) -> Box<dyn Iterator<Item = (Cow<'_, str>, Self)> + '_> { in record_fields()
59 return Box::new(std::iter::empty()); in record_fields()
61 Box::new(record.fields().map(|f| (f.name.into(), f.ty.clone()))) in record_fields()
64 fn tuple_element_types(&self) -> Box<dyn Iterator<Item = Self> + '_> { in tuple_element_types()
66 return Box::new(std::iter::empty()); in tuple_element_types()
68 Box::new(tuple.types()) in tuple_element_types()
71 fn variant_cases(&self) -> Box<dyn Iterator<Item = (Cow<'_, str>, Option<Self>)> + '_> { in variant_cases()
73 return Box::new(std::iter::empty()); in variant_cases()
75 Box::new(variant.cases().map(|case| (case.name.into(), case.ty))) in variant_cases()
78 fn enum_cases(&self) -> Box<dyn Iterator<Item = Cow<'_, str>> + '_> { in enum_cases()
80 return Box::new(std::iter::empty()); in enum_cases()
82 Box::new(enum_.names().map(Into::into)) in enum_cases()
94 fn flags_names(&self) -> Box<dyn Iterator<Item = Cow<'_, str>> + '_> { in flags_names()
96 return Box::new(std::iter::empty()); in flags_names()
98 Box::new(flags.names().map(Into::into)) in flags_names()
212 let val = Self::Variant(case.to_string(), val.map(Box::new)); in make_variant()
224 let val = Self::Option(val.map(Box::new)); in make_option()
234 Ok(val) => Self::Result(Ok(val.map(Box::new))), in make_result()
235 Err(val) => Self::Result(Err(val.map(Box::new))), in make_result()
261 fn unwrap_list(&self) -> Box<dyn Iterator<Item = Cow<'_, Self>> + '_> { in unwrap_list()
263 Box::new(list.iter().map(cow)) in unwrap_list()
265 fn unwrap_record(&self) -> Box<dyn Iterator<Item = (Cow<'_, str>, Cow<'_, Self>)> + '_> { in unwrap_record()
267 Box::new(record.iter().map(|(name, val)| (name.into(), cow(val)))) in unwrap_record()
269 fn unwrap_tuple(&self) -> Box<dyn Iterator<Item = Cow<'_, Self>> + '_> { in unwrap_tuple()
271 Box::new(tuple.iter().map(cow)) in unwrap_tuple()
291 fn unwrap_flags(&self) -> Box<dyn Iterator<Item = Cow<'_, str>> + '_> { in unwrap_flags()
293 Box::new(flags.iter().map(Into::into)) in unwrap_flags()
407 fn params(&self) -> Box<dyn Iterator<Item = Self::Type> + '_> { in params()
408 Box::new(self.params().map(|(_n, t)| t)) in params()
411 fn results(&self) -> Box<dyn Iterator<Item = Self::Type> + '_> { in results()
412 Box::new(self.results()) in results()