1 // Take a look at the license at the top of the repository in the LICENSE file. 2 3 use glib::translate::*; 4 use glib::GString; 5 use std::iter::{IntoIterator, Iterator}; 6 7 pub struct FileAttributematcherIter(crate::FileAttributeMatcher); 8 9 impl Iterator for FileAttributematcherIter { 10 type Item = GString; 11 12 #[doc(alias = "g_file_attribute_matcher_enumerate_next")] next(&mut self) -> Option<GString>13 fn next(&mut self) -> Option<GString> { 14 unsafe { 15 from_glib_none(ffi::g_file_attribute_matcher_enumerate_next( 16 self.0.to_glib_none().0, 17 )) 18 } 19 } 20 } 21 22 impl IntoIterator for crate::FileAttributeMatcher { 23 type Item = GString; 24 type IntoIter = FileAttributematcherIter; 25 into_iter(self) -> Self::IntoIter26 fn into_iter(self) -> Self::IntoIter { 27 FileAttributematcherIter(self) 28 } 29 } 30