gio/
file_attribute_matcher.rs

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