diff --git a/gstreamer-audio/src/caps.rs b/gstreamer-audio/src/caps.rs index 5f13c82a0..c13a144b8 100644 --- a/gstreamer-audio/src/caps.rs +++ b/gstreamer-audio/src/caps.rs @@ -91,27 +91,27 @@ impl AudioCapsBuilder { } } - pub fn features( + pub fn features( self, - features: impl IntoIterator, + features: impl IntoIterator, ) -> AudioCapsBuilder { AudioCapsBuilder { builder: self.builder.features(features), } } - pub fn features_from_statics( + pub fn features_from_statics + 'static>( self, - features: impl IntoIterator + 'static>, + features: impl IntoIterator, ) -> AudioCapsBuilder { AudioCapsBuilder { builder: self.builder.features_from_statics(features), } } - pub fn features_from_ids( + pub fn features_from_ids>( self, - features: impl IntoIterator>, + features: impl IntoIterator, ) -> AudioCapsBuilder { AudioCapsBuilder { builder: self.builder.features_from_ids(features), diff --git a/gstreamer-rtsp-server/src/rtsp_token.rs b/gstreamer-rtsp-server/src/rtsp_token.rs index fc71e6590..9f2d1d381 100644 --- a/gstreamer-rtsp-server/src/rtsp_token.rs +++ b/gstreamer-rtsp-server/src/rtsp_token.rs @@ -24,7 +24,7 @@ impl RTSPToken { } #[allow(clippy::should_implement_trait)] - pub fn from_iter(iter: impl IntoIterator) -> RTSPToken { + pub fn from_iter(iter: impl IntoIterator) -> RTSPToken { skip_assert_initialized!(); let mut token = RTSPToken::new_empty(); diff --git a/gstreamer-video/src/caps.rs b/gstreamer-video/src/caps.rs index a31f5bd8b..5d402af58 100644 --- a/gstreamer-video/src/caps.rs +++ b/gstreamer-video/src/caps.rs @@ -73,27 +73,27 @@ impl VideoCapsBuilder { } } - pub fn features( + pub fn features( self, - features: impl IntoIterator, + features: impl IntoIterator, ) -> VideoCapsBuilder { VideoCapsBuilder { builder: self.builder.features(features), } } - pub fn features_from_statics( + pub fn features_from_statics + 'static>( self, - features: impl IntoIterator + 'static>, + features: impl IntoIterator, ) -> VideoCapsBuilder { VideoCapsBuilder { builder: self.builder.features_from_statics(features), } } - pub fn features_from_ids( + pub fn features_from_ids>( self, - features: impl IntoIterator>, + features: impl IntoIterator, ) -> VideoCapsBuilder { VideoCapsBuilder { builder: self.builder.features_from_ids(features), diff --git a/gstreamer/src/bin.rs b/gstreamer/src/bin.rs index 3f0edf619..eb49e0d8f 100644 --- a/gstreamer/src/bin.rs +++ b/gstreamer/src/bin.rs @@ -47,9 +47,9 @@ impl Bin { pub trait GstBinExtManual: IsA + 'static { #[doc(alias = "gst_bin_add_many")] - fn add_many( + fn add_many>( &self, - elements: impl IntoIterator>, + elements: impl IntoIterator, ) -> Result<(), glib::BoolError> { for e in elements { unsafe { @@ -64,9 +64,9 @@ pub trait GstBinExtManual: IsA + 'static { } #[doc(alias = "gst_bin_remove_many")] - fn remove_many( + fn remove_many>( &self, - elements: impl IntoIterator>, + elements: impl IntoIterator, ) -> Result<(), glib::BoolError> { for e in elements { unsafe { diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index ee3a1d7e8..39e0bd03b 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -473,10 +473,13 @@ impl CapsRef { /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn set_from_iter + Sync>( + pub fn set_from_iter< + V: ValueType + ToSendValue + FromIterator + Sync, + I: ToSendValue, + >( &mut self, name: impl IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let iter = iter.into_iter().map(|item| item.to_send_value()); self.set(name, V::from_iter(iter)); @@ -489,10 +492,11 @@ impl CapsRef { #[inline] pub fn set_with_static_from_iter< V: ValueType + ToSendValue + FromIterator + Sync, + I: ToSendValue, >( &mut self, name: impl AsRef + 'static, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let iter = iter.into_iter().map(|item| item.to_send_value()); self.set_with_static(name, V::from_iter(iter)); @@ -503,10 +507,13 @@ impl CapsRef { /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn set_with_id_from_iter + Sync>( + pub fn set_with_id_from_iter< + V: ValueType + ToSendValue + FromIterator + Sync, + I: ToSendValue, + >( &mut self, name: impl AsRef, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let iter = iter.into_iter().map(|item| item.to_send_value()); self.set_with_id(name, V::from_iter(iter)); @@ -518,10 +525,13 @@ impl CapsRef { /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn set_if_not_empty + Sync>( + pub fn set_if_not_empty< + V: ValueType + ToSendValue + FromIterator + Sync, + I: ToSendValue, + >( &mut self, name: impl IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -538,10 +548,11 @@ impl CapsRef { #[inline] pub fn set_with_static_if_not_empty< V: ValueType + ToSendValue + FromIterator + Sync, + I: ToSendValue, >( &mut self, name: impl AsRef + 'static, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -556,10 +567,13 @@ impl CapsRef { /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn set_with_id_if_not_empty + Sync>( + pub fn set_with_id_if_not_empty< + V: ValueType + ToSendValue + FromIterator + Sync, + I: ToSendValue, + >( &mut self, name: impl AsRef, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -1293,9 +1307,9 @@ impl Builder { } } - pub fn features( + pub fn features( self, - features: impl IntoIterator, + features: impl IntoIterator, ) -> Builder { Builder { s: self.s, @@ -1304,9 +1318,9 @@ impl Builder { } } - pub fn features_from_statics( + pub fn features_from_statics + 'static>( self, - features: impl IntoIterator + 'static>, + features: impl IntoIterator, ) -> Builder { Builder { s: self.s, @@ -1315,9 +1329,9 @@ impl Builder { } } - pub fn features_from_ids( + pub fn features_from_ids>( self, - features: impl IntoIterator>, + features: impl IntoIterator, ) -> Builder { Builder { s: self.s, diff --git a/gstreamer/src/caps_features.rs b/gstreamer/src/caps_features.rs index fb822b57d..0fd81d2cd 100644 --- a/gstreamer/src/caps_features.rs +++ b/gstreamer/src/caps_features.rs @@ -22,7 +22,7 @@ unsafe impl Sync for CapsFeatures {} impl CapsFeatures { #[doc(alias = "gst_caps_features_new")] - pub fn new(features: impl IntoIterator) -> Self { + pub fn new(features: impl IntoIterator) -> Self { skip_assert_initialized!(); let mut f = Self::new_empty(); @@ -34,8 +34,8 @@ impl CapsFeatures { } #[doc(alias = "gst_caps_features_new_static_str")] - pub fn new_from_static( - features: impl IntoIterator + 'static>, + pub fn new_from_static + 'static>( + features: impl IntoIterator, ) -> Self { skip_assert_initialized!(); let mut f = Self::new_empty(); @@ -48,7 +48,7 @@ impl CapsFeatures { } #[doc(alias = "gst_caps_features_new_id_str")] - pub fn new_from_id(features: impl IntoIterator>) -> Self { + pub fn new_from_id>(features: impl IntoIterator) -> Self { skip_assert_initialized!(); let mut f = Self::new_empty(); diff --git a/gstreamer/src/element.rs b/gstreamer/src/element.rs index 41ac77ec7..c6d46a9a0 100644 --- a/gstreamer/src/element.rs +++ b/gstreamer/src/element.rs @@ -18,8 +18,8 @@ use crate::{ impl Element { #[doc(alias = "gst_element_link_many")] - pub fn link_many( - elements: impl IntoIterator + Clone>, + pub fn link_many + Clone>( + elements: impl IntoIterator, ) -> Result<(), glib::BoolError> { skip_assert_initialized!(); for (src, dest) in elements.into_iter().tuple_windows() { @@ -40,7 +40,7 @@ impl Element { } #[doc(alias = "gst_element_unlink_many")] - pub fn unlink_many(elements: impl IntoIterator + Clone>) { + pub fn unlink_many + Clone>(elements: impl IntoIterator) { skip_assert_initialized!(); for (src, dest) in elements.into_iter().tuple_windows() { unsafe { diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 09da06e5c..1fd746793 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -4111,19 +4111,22 @@ impl<'a> PropertyNotifyBuilder<'a> { } } - pub fn value_from_iter>( + pub fn value_from_iter, I: ToSendValue>( self, name: &'a str, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let iter = iter.into_iter().map(|item| item.to_send_value()); self.other_field(name, V::from_iter(iter)) } - pub fn value_field_if_not_empty>( + pub fn value_field_if_not_empty< + V: ValueType + ToSendValue + FromIterator, + I: ToSendValue, + >( self, name: &'a str, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -4181,9 +4184,9 @@ impl<'a> StreamsSelectedBuilder<'a> { } } - pub fn streams( + pub fn streams>( self, - streams: impl IntoIterator>, + streams: impl IntoIterator, ) -> Self { Self { streams: streams @@ -4194,9 +4197,9 @@ impl<'a> StreamsSelectedBuilder<'a> { } } - pub fn streams_if( + pub fn streams_if>( self, - streams: impl IntoIterator>, + streams: impl IntoIterator, predicate: bool, ) -> Self { if predicate { @@ -4206,9 +4209,9 @@ impl<'a> StreamsSelectedBuilder<'a> { } } - pub fn streams_if_some( + pub fn streams_if_some>( self, - streams: Option>>, + streams: Option>, ) -> Self { if let Some(streams) = streams { self.streams(streams) @@ -4217,9 +4220,9 @@ impl<'a> StreamsSelectedBuilder<'a> { } } - pub fn streams_if_not_empty( + pub fn streams_if_not_empty>( self, - streams: impl IntoIterator>, + streams: impl IntoIterator, ) -> Self { let mut streams = streams.into_iter().peekable(); if streams.peek().is_some() { diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index 6a37a6b46..4d9531c13 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -120,9 +120,9 @@ impl Structure { } #[allow(clippy::should_implement_trait)] - pub fn from_iter( + pub fn from_iter( name: impl IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Structure { skip_assert_initialized!(); let mut structure = Structure::new_empty(name); @@ -134,9 +134,9 @@ impl Structure { } #[allow(clippy::should_implement_trait)] - pub fn from_iter_with_static( + pub fn from_iter_with_static + 'static>( name: impl AsRef + 'static, - iter: impl IntoIterator + 'static, SendValue)>, + iter: impl IntoIterator, ) -> Structure { skip_assert_initialized!(); let mut structure = Structure::new_empty_from_static(name); @@ -148,9 +148,9 @@ impl Structure { } #[allow(clippy::should_implement_trait)] - pub fn from_iter_with_id( + pub fn from_iter_with_id>( name: impl AsRef, - iter: impl IntoIterator, SendValue)>, + iter: impl IntoIterator, ) -> Structure { skip_assert_initialized!(); let mut structure = Structure::new_empty_from_id(name); @@ -789,10 +789,13 @@ impl StructureRef { /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn set_from_iter + FromIterator + Send>( + pub fn set_from_iter< + V: ValueType + Into + FromIterator + Send, + I: ToSendValue, + >( &mut self, name: impl IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let iter = iter.into_iter().map(|item| item.to_send_value()); self.set(name, V::from_iter(iter)); @@ -805,10 +808,11 @@ impl StructureRef { #[inline] pub fn set_with_static_from_iter< V: ValueType + Into + FromIterator + Send, + I: ToSendValue, >( &mut self, name: impl AsRef + 'static, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let iter = iter.into_iter().map(|item| item.to_send_value()); self.set_with_static(name, V::from_iter(iter)); @@ -819,10 +823,13 @@ impl StructureRef { /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn set_with_id_from_iter + FromIterator + Send>( + pub fn set_with_id_from_iter< + V: ValueType + Into + FromIterator + Send, + I: ToSendValue, + >( &mut self, name: impl AsRef, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let iter = iter.into_iter().map(|item| item.to_send_value()); self.set_with_id(name, V::from_iter(iter)); @@ -834,10 +841,13 @@ impl StructureRef { /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn set_if_not_empty + FromIterator + Send>( + pub fn set_if_not_empty< + V: ValueType + Into + FromIterator + Send, + I: ToSendValue, + >( &mut self, name: impl IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -854,10 +864,11 @@ impl StructureRef { #[inline] pub fn set_with_static_if_not_empty< V: ValueType + Into + FromIterator + Send, + I: ToSendValue, >( &mut self, name: impl AsRef + 'static, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -872,10 +883,13 @@ impl StructureRef { /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn set_with_id_if_not_empty + FromIterator + Send>( + pub fn set_with_id_if_not_empty< + V: ValueType + Into + FromIterator + Send, + I: ToSendValue, + >( &mut self, name: impl AsRef, - iter: impl IntoIterator, + iter: impl IntoIterator, ) { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -1242,7 +1256,7 @@ impl StructureRef { } #[doc(alias = "gst_structure_remove_fields")] - pub fn remove_fields(&mut self, fields: impl IntoIterator) { + pub fn remove_fields(&mut self, fields: impl IntoIterator) { for f in fields.into_iter() { self.remove_field(f) } @@ -1262,7 +1276,7 @@ impl StructureRef { } #[doc(alias = "gst_structure_id_str_remove_fields")] - pub fn remove_field_by_ids(&mut self, fields: impl IntoIterator>) { + pub fn remove_field_by_ids>(&mut self, fields: impl IntoIterator) { for f in fields.into_iter() { self.remove_field_by_id(f) } @@ -2314,9 +2328,9 @@ mod tests { static SLIST: &GStr = gstr!("slist"); let ilist = idstr!("ilist"); let s = Structure::builder("test") - .field_from_iter::("array", [&1, &2, &3]) - .field_with_static_from_iter::(SLIST, [&4, &5, &6]) - .field_with_id_from_iter::(&ilist, [&7, &8, &9]) + .field_from_iter::("array", [1, 2, 3]) + .field_with_static_from_iter::(SLIST, [4, 5, 6]) + .field_with_id_from_iter::(&ilist, [7, 8, 9]) .build(); assert!(s .get::("array") @@ -2339,9 +2353,9 @@ mod tests { let array = Vec::::new(); let s = Structure::builder("test") - .field_from_iter::("array", &array) - .field_with_static_from_iter::(SLIST, &array) - .field_with_id_from_iter::(&ilist, &array) + .field_from_iter::("array", &array) + .field_with_static_from_iter::(SLIST, &array) + .field_with_id_from_iter::(&ilist, &array) .build(); assert!(s.get::("array").unwrap().as_ref().is_empty()); assert!(s.get::(SLIST).unwrap().as_ref().is_empty()); @@ -2359,9 +2373,9 @@ mod tests { static SLIST: &GStr = gstr!("slist"); let ilist = idstr!("ilist"); let s = Structure::builder_from_id(idstr!("test")) - .field_if_not_empty::("array", [&1, &2, &3]) - .field_with_static_if_not_empty::(SLIST, [&4, &5, &6]) - .field_with_id_if_not_empty::(&ilist, [&7, &8, &9]) + .field_if_not_empty::("array", [1, 2, 3]) + .field_with_static_if_not_empty::(SLIST, [4, 5, 6]) + .field_with_id_if_not_empty::(&ilist, [7, 8, 9]) .build(); assert!(s .get::("array") @@ -2384,9 +2398,9 @@ mod tests { let array = Vec::::new(); let s = Structure::builder("test") - .field_if_not_empty::("array", &array) - .field_with_static_if_not_empty::(SLIST, &array) - .field_with_id_if_not_empty::(ilist, &array) + .field_if_not_empty::("array", &array) + .field_with_static_if_not_empty::(SLIST, &array) + .field_with_id_if_not_empty::(ilist, &array) .build(); assert!(!s.has_field("array")); assert!(!s.has_field("slist")); diff --git a/gstreamer/src/subclass/element.rs b/gstreamer/src/subclass/element.rs index 9769f9fe3..896164f76 100644 --- a/gstreamer/src/subclass/element.rs +++ b/gstreamer/src/subclass/element.rs @@ -846,7 +846,7 @@ mod tests { .eq(["default0", "default1"])); let elem = crate::ElementFactory::make("testelement") - .property_from_iter::("array", ["value0", "value1"]) + .property_from_iter::("array", ["value0", "value1"]) .build() .unwrap(); assert!(elem @@ -857,7 +857,7 @@ mod tests { let array = Vec::::new(); let elem = crate::ElementFactory::make("testelement") - .property_if_not_empty::("array", &array) + .property_if_not_empty::("array", &array) .build() .unwrap(); assert!(elem @@ -867,7 +867,7 @@ mod tests { .eq(["default0", "default1"])); let elem = crate::ElementFactory::make("testelement") - .property_if_not_empty::("array", ["value0", "value1"]) + .property_if_not_empty::("array", ["value0", "value1"]) .build() .unwrap(); assert!(elem diff --git a/gstreamer/src/value.rs b/gstreamer/src/value.rs index ebc05e823..bb0f7cb70 100644 --- a/gstreamer/src/value.rs +++ b/gstreamer/src/value.rs @@ -829,7 +829,7 @@ impl fmt::Debug for Array { } impl Array { - pub fn new(values: impl IntoIterator + Send>) -> Self { + pub fn new + Send>(values: impl IntoIterator) -> Self { assert_initialized_main_thread!(); unsafe { @@ -1056,7 +1056,7 @@ impl fmt::Debug for List { } impl List { - pub fn new(values: impl IntoIterator + Send>) -> Self { + pub fn new + Send>(values: impl IntoIterator) -> Self { assert_initialized_main_thread!(); unsafe { @@ -1575,10 +1575,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn field_from_iter + FromIterator<$crate::glib::SendValue> + Send>( + pub fn field_from_iter< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue> + Send, + I: $crate::glib::value::ToSendValue, + >( self, name: impl $crate::glib::IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let iter = iter.into_iter().map(|item| item.to_send_value()); self.field(name, V::from_iter(iter)) @@ -1589,10 +1592,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn field_with_static_from_iter + FromIterator<$crate::glib::SendValue> + Send>( + pub fn field_with_static_from_iter< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue> + Send, + I: $crate::glib::value::ToSendValue, + >( self, name: impl AsRef<$crate::glib::GStr> + 'static, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let iter = iter.into_iter().map(|item| item.to_send_value()); self.field_with_static(name, V::from_iter(iter)) @@ -1603,10 +1609,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn field_with_id_from_iter + FromIterator<$crate::glib::SendValue> + Send>( + pub fn field_with_id_from_iter< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue> + Send, + I: $crate::glib::value::ToSendValue, + >( self, name: impl AsRef<$crate::IdStr>, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let iter = iter.into_iter().map(|item| item.to_send_value()); self.field_with_id(name, V::from_iter(iter)) @@ -1618,10 +1627,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn field_if_not_empty + FromIterator<$crate::glib::SendValue> + Send>( + pub fn field_if_not_empty< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue> + Send, + I: $crate::glib::value::ToSendValue, + >( self, name: impl $crate::glib::IntoGStr, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -1638,10 +1650,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn field_with_static_if_not_empty + FromIterator<$crate::glib::SendValue> + Send>( + pub fn field_with_static_if_not_empty< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue> + Send, + I: $crate::glib::value::ToSendValue, + >( self, name: impl AsRef<$crate::glib::GStr> + 'static, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -1658,10 +1673,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn field_with_id_if_not_empty + FromIterator<$crate::glib::SendValue> + Send>( + pub fn field_with_id_if_not_empty + + FromIterator<$crate::glib::SendValue> + Send, + I: $crate::glib::value::ToSendValue, + >( self, name: impl AsRef, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -1706,10 +1724,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn other_field_from_iter>( + pub fn other_field_from_iter< + V: $crate::glib::value::ValueType + $crate::glib::value::ToSendValue + FromIterator<$crate::glib::SendValue>, + I: $crate::glib::value::ToSendValue, + >( self, name: &'a str, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let iter = iter.into_iter().map(|item| item.to_send_value()); self.other_field(name, V::from_iter(iter)) @@ -1721,10 +1742,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn other_field_if_not_empty>( + pub fn other_field_if_not_empty< + V: $crate::glib::value::ValueType + $crate::glib::value::ToSendValue + FromIterator<$crate::glib::SendValue>, + I: $crate::glib::value::ToSendValue, + >( self, name: &'a str, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() { @@ -1769,10 +1793,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// Overrides any default or previously defined value for `name`. #[inline] - pub fn property_from_iter + FromIterator<$crate::glib::SendValue>>( + pub fn property_from_iter< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue>, + I: $crate::glib::value::ToSendValue, + >( self, name: &'a str, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let iter = iter.into_iter().map(|item| item.to_send_value()); self.property(name, V::from_iter(iter)) @@ -1784,10 +1811,13 @@ macro_rules! impl_builder_gvalue_extra_setters ( /// /// This has no effect if `iter` is empty, i.e. previous value for `name` is unchanged. #[inline] - pub fn property_if_not_empty + FromIterator<$crate::glib::SendValue>>( + pub fn property_if_not_empty< + V: $crate::glib::value::ValueType + Into<$crate::glib::Value> + FromIterator<$crate::glib::SendValue>, + I: $crate::glib::value::ToSendValue, + >( self, name: &'a str, - iter: impl IntoIterator, + iter: impl IntoIterator, ) -> Self { let mut iter = iter.into_iter().peekable(); if iter.peek().is_some() {