Debian Codegraph @

debian/missing-sources/glib/tests/regex_compiletest/04-nonstatic-value.rs

raw
1 #![allow(unused)]
2
3 use glib::prelude::*;
4
5 fn main() {
6 let r = glib::Regex::new(
7 "hello",
8 glib::RegexCompileFlags::DEFAULT,
9 glib::RegexMatchFlags::DEFAULT,
10 )
11 .unwrap()
12 .unwrap();
13 let s = glib::GString::from("hello");
14 let match_info = r
15 .match_(s.as_gstr(), glib::RegexMatchFlags::DEFAULT)
16 .expect("should match");
17 dbg!(match_info.fetch_all());
18 let v: glib::Value = match_info.to_value();
19 drop(match_info);
20 drop(s);
21 let match_info = v.get::<glib::MatchInfo<'_>>().unwrap();
22 }