| 1 | use glibrust-analyzer cargo glib 0.22.5 crate/::{Valuerust-analyzer cargo glib 0.22.5 value/Value#, ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:, preluderust-analyzer cargo glib 0.22.5 prelude/::*, valuerust-analyzer cargo glib 0.22.5 value/::FromValuerust-analyzer cargo glib 0.22.5 value/FromValue#}; |
| 2 | |
| 3 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 4 | fn into_valuerust-analyzer cargo glib-macros 0.22.6 into_value().() { |
| 5 | fn test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(_: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Valuerust-analyzer cargo glib 0.22.5 value/Value#>) {} |
| 6 | |
| 7 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:)] |
| 8 | pub struct Testrust-analyzer cargo glib-macros 0.22.6 Test#(i32); |
| 9 | |
| 10 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:)] |
| 11 | #[value_delegate(nullable)] |
| 12 | pub struct TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#); |
| 13 | |
| 14 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:)] |
| 15 | #[value_delegate(from = i64)] |
| 16 | pub struct TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#(i32); |
| 17 | |
| 18 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<i64> for TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom# { |
| 19 | fn fromrust-analyzer cargo glib-macros 0.22.6 impl#[TestManualFrom][`From<i64>`]from().(v: i64) -> Selfrust-analyzer cargo glib-macros 0.22.6 impl#[TestManualFrom][`From<i64>`] { |
| 20 | Selfrust-analyzer cargo glib-macros 0.22.6 impl#[TestManualFrom][`From<i64>`](v as i32) |
| 21 | } |
| 22 | } |
| 23 | impl<'a> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<&'a TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#> for i64 { |
| 24 | fn fromrust-analyzer cargo glib-macros 0.22.6 impl#[i64][`From<&'a TestManualFrom>`]from().(v: &'a TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#) -> Selfrust-analyzer cargo glib-macros 0.22.6 impl#[i64][`From<&'a TestManualFrom>`] { |
| 25 | v.0rust-analyzer cargo glib-macros 0.22.6 TestManualFrom#0. as i64 |
| 26 | } |
| 27 | } |
| 28 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#> for i64 { |
| 29 | fn fromrust-analyzer cargo glib-macros 0.22.6 impl#[i64][`From<TestManualFrom>`]from().(v: TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#) -> Selfrust-analyzer cargo glib-macros 0.22.6 impl#[i64][`From<TestManualFrom>`] { |
| 30 | v.0rust-analyzer cargo glib-macros 0.22.6 TestManualFrom#0. as i64 |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(Testrust-analyzer cargo glib-macros 0.22.6 Test#(123)); |
| 35 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(Testrust-analyzer cargo glib-macros 0.22.6 Test#(123)); |
| 36 | |
| 37 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#(123)); |
| 38 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#(123)); |
| 39 | |
| 40 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())); |
| 41 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())); |
| 42 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()))); |
| 43 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()))); |
| 44 | test_funcrust-analyzer cargo glib-macros 0.22.6 test_func().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()))); |
| 45 | |
| 46 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(Testrust-analyzer cargo glib-macros 0.22.6 Test#(123)).getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Testrust-analyzer cargo glib-macros 0.22.6 Test#>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().0rust-analyzer cargo glib-macros 0.22.6 Test#0., 123); |
| 47 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo glib 0.22.5 value/impl#[Value][`From<i32>`]from().(123).getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Testrust-analyzer cargo glib-macros 0.22.6 Test#>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().0rust-analyzer cargo glib-macros 0.22.6 Test#0., 123); |
| 48 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(Testrust-analyzer cargo glib-macros 0.22.6 Test#(123)).getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<i32>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 123); |
| 49 | |
| 50 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 51 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#(123)) |
| 52 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#>() |
| 53 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 54 | .0rust-analyzer cargo glib-macros 0.22.6 TestManualFrom#0., |
| 55 | 123 |
| 56 | ); |
| 57 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 58 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo glib 0.22.5 value/impl#[Value][`From<i64>`]from().(123_i64) |
| 59 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#>() |
| 60 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 61 | .0rust-analyzer cargo glib-macros 0.22.6 TestManualFrom#0., |
| 62 | 123 |
| 63 | ); |
| 64 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 65 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(TestManualFromrust-analyzer cargo glib-macros 0.22.6 TestManualFrom#(123)).getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<i64>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 66 | 123 |
| 67 | ); |
| 68 | |
| 69 | // From TestNullable |
| 70 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 71 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())) |
| 72 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>>() |
| 73 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 74 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 75 | .0rust-analyzer cargo glib-macros 0.22.6 TestNullable#0., |
| 76 | "foo" |
| 77 | ); |
| 78 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 79 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo glib 0.22.5 value/impl#[Value][`From<&'a T>`]from().("foo") |
| 80 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>>() |
| 81 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 82 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 83 | .0rust-analyzer cargo glib-macros 0.22.6 TestNullable#0., |
| 84 | "foo" |
| 85 | ); |
| 86 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 87 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().())) |
| 88 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>() |
| 89 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 90 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), |
| 91 | "foo" |
| 92 | ); |
| 93 | // From Option<TestNullable> Some |
| 94 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 95 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()))) |
| 96 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>>() |
| 97 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 98 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 99 | .0rust-analyzer cargo glib-macros 0.22.6 TestNullable#0., |
| 100 | "foo" |
| 101 | ); |
| 102 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 103 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo glib 0.22.5 value/impl#[Value][`From<Option<T>>`]from().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("foo")) |
| 104 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>>() |
| 105 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 106 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 107 | .0rust-analyzer cargo glib-macros 0.22.6 TestNullable#0., |
| 108 | "foo" |
| 109 | ); |
| 110 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 111 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()))) |
| 112 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>() |
| 113 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 114 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), |
| 115 | "foo" |
| 116 | ); |
| 117 | // From Option<TestNullable> None |
| 118 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!( |
| 119 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#::<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>) |
| 120 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>>() |
| 121 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 122 | .is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 123 | ); |
| 124 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!( |
| 125 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo glib 0.22.5 value/impl#[Value][`From<Option<T>>`]from().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) |
| 126 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>>() |
| 127 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 128 | .is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 129 | ); |
| 130 | assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!( |
| 131 | glibrust-analyzer cargo glib 0.22.5 crate/::Valuerust-analyzer cargo glib 0.22.5 value/Value#::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#from().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#::<TestNullablerust-analyzer cargo glib-macros 0.22.6 TestNullable#>) |
| 132 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>() |
| 133 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 134 | .is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() |
| 135 | ); |
| 136 | } |
| 137 | |
| 138 | #[allow(clippy::unnecessary_literal_unwrap)] |
| 139 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 140 | fn higher_level_typesrust-analyzer cargo glib-macros 0.22.6 higher_level_types().() { |
| 141 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:)] |
| 142 | pub struct MyVecrust-analyzer cargo glib-macros 0.22.6 MyVec#(Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>); |
| 143 | |
| 144 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:)] |
| 145 | #[value_delegate(nullable)] |
| 146 | pub struct MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>); |
| 147 | |
| 148 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, ValueDelegaterust-analyzer cargo glib-macros 0.22.2 ValueDelegate:)] |
| 149 | #[value_delegate(from = Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>)] |
| 150 | struct MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#(Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>); |
| 151 | |
| 152 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>> for MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom# { |
| 153 | fn fromrust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][`From<Option<String>>`]from().(v: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) -> Selfrust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][`From<Option<String>>`] { |
| 154 | Selfrust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][`From<Option<String>>`](v.into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>()) |
| 155 | } |
| 156 | } |
| 157 | impl<'a> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<&'a MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#> for Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 158 | fn fromrust-analyzer cargo glib-macros 0.22.6 impl#[`Option<String>`][`From<&'a MyVecManualFrom>`]from().(v: &'a MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#) -> Selfrust-analyzer cargo glib-macros 0.22.6 impl#[`Option<String>`][`From<&'a MyVecManualFrom>`] { |
| 159 | v.0rust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#0..firstrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]first().().clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<&T>`]cloned().() |
| 160 | } |
| 161 | } |
| 162 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#> for Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 163 | fn fromrust-analyzer cargo glib-macros 0.22.6 impl#[`Option<String>`][`From<MyVecManualFrom>`]from().(v: MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#) -> Selfrust-analyzer cargo glib-macros 0.22.6 impl#[`Option<String>`][`From<MyVecManualFrom>`] { |
| 164 | v.0rust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#0..into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/into_iter/impl#[`IntoIter<T, A>`][Iterator]next().() |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | let vec = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!!["foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), "bar".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()]; |
| 169 | let vec_value = vec.to_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Vec<String>`][ToValue]to_value().(); |
| 170 | let my_vec_value = MyVecrust-analyzer cargo glib-macros 0.22.6 MyVec#(vec).to_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyVec][ToValue]to_value().(); |
| 171 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(MyVecrust-analyzer cargo glib-macros 0.22.6 MyVec#::static_typerust-analyzer cargo glib-macros 0.22.6 impl#[MyVec][StaticType]static_type().(), Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::static_typerust-analyzer cargo glib 0.22.5 types/impl#[`Vec<String>`][StaticType]static_type().()); |
| 172 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 173 | vec_value.getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 174 | my_vec_value.getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 175 | ); |
| 176 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(vec_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().(), my_vec_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().()); |
| 177 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(unsafe { Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Vec<String>`][`FromValue<'a>`]from_value().(&vec_value) }, unsafe { |
| 178 | MyVecrust-analyzer cargo glib-macros 0.22.6 MyVec#::from_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyVec][`FromValue<'a>`]from_value().(&vec_value).0rust-analyzer cargo glib-macros 0.22.6 MyVec#0. |
| 179 | }); |
| 180 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 181 | unsafe { Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Vec<String>`][`FromValue<'a>`]from_value().(&my_vec_value) }, |
| 182 | unsafe { MyVecrust-analyzer cargo glib-macros 0.22.6 MyVec#::from_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyVec][`FromValue<'a>`]from_value().(&my_vec_value).0rust-analyzer cargo glib-macros 0.22.6 MyVec#0. } |
| 183 | ); |
| 184 | |
| 185 | let string = "foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 186 | let string_value = string.to_valuerust-analyzer cargo glib 0.22.5 value/impl#[String][ToValue]to_value().(); |
| 187 | let my_string_value = MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#(string.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()).to_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyString][ToValue]to_value().(); |
| 188 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#::static_typerust-analyzer cargo glib-macros 0.22.6 impl#[MyString][StaticType]static_type().(), Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::<str>::static_typerust-analyzer cargo glib 0.22.5 value/impl#[`Box<str>`][StaticType]static_type().()); |
| 189 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 190 | string_value.getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 191 | my_string_value.getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 192 | ); |
| 193 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(string_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().(), my_string_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().()); |
| 194 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(unsafe { Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::<str>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Box<str>`][`FromValue<'a>`]from_value().(&string_value) }, unsafe { |
| 195 | MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#::from_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyString][`FromValue<'a>`]from_value().(&string_value).0rust-analyzer cargo glib-macros 0.22.6 MyString#0. |
| 196 | }); |
| 197 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 198 | unsafe { Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::<str>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Box<str>`][`FromValue<'a>`]from_value().(&my_string_value) }, |
| 199 | unsafe { MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#::from_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyString][`FromValue<'a>`]from_value().(&my_string_value).0rust-analyzer cargo glib-macros 0.22.6 MyString#0. } |
| 200 | ); |
| 201 | |
| 202 | let string_some = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 203 | let string_some_value = string_some.to_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][ToValue]to_value().(); |
| 204 | let string_none_value = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>.to_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][ToValue]to_value().(); |
| 205 | let my_string_some_value = MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#(string_some.unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()).to_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyString][ToValue]to_value().(); |
| 206 | let my_string_none_value = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#::<MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#>.to_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][ToValue]to_value().(); |
| 207 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 208 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#>::static_typerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][StaticType]static_type().(), |
| 209 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>::static_typerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][StaticType]static_type().() |
| 210 | ); |
| 211 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 212 | string_some_value |
| 213 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>>() |
| 214 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 215 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), |
| 216 | my_string_some_value |
| 217 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>>() |
| 218 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 219 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), |
| 220 | ); |
| 221 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 222 | string_none_value |
| 223 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>>() |
| 224 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 225 | .is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().(), |
| 226 | my_string_none_value |
| 227 | .getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>>() |
| 228 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 229 | .is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().(), |
| 230 | ); |
| 231 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 232 | string_some_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().(), |
| 233 | my_string_some_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().() |
| 234 | ); |
| 235 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 236 | string_none_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().(), |
| 237 | my_string_none_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().() |
| 238 | ); |
| 239 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 240 | unsafe { Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&string_some_value).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() }, |
| 241 | unsafe { |
| 242 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&string_some_value) |
| 243 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 244 | .0rust-analyzer cargo glib-macros 0.22.6 MyString#0. |
| 245 | } |
| 246 | ); |
| 247 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 248 | unsafe { Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&string_none_value).is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() }, |
| 249 | unsafe { Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&string_none_value).is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() } |
| 250 | ); |
| 251 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 252 | unsafe { Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&my_string_some_value).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() }, |
| 253 | unsafe { |
| 254 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&my_string_some_value) |
| 255 | .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() |
| 256 | .0rust-analyzer cargo glib-macros 0.22.6 MyString#0. |
| 257 | } |
| 258 | ); |
| 259 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 260 | unsafe { Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&my_string_none_value).is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() }, |
| 261 | unsafe { Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<MyStringrust-analyzer cargo glib-macros 0.22.6 MyString#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&my_string_none_value).is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() } |
| 262 | ); |
| 263 | |
| 264 | let opt = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("foo".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 265 | let opt_value = opt.to_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][ToValue]to_value().(); |
| 266 | let my_vec_manual_from_value = MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#::fromrust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][`From<Option<String>>`]from().(opt).to_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][ToValue]to_value().(); |
| 267 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 268 | MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#::static_typerust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][StaticType]static_type().(), |
| 269 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::static_typerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][StaticType]static_type().() |
| 270 | ); |
| 271 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 272 | opt_value.getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 273 | my_vec_manual_from_value.getrust-analyzer cargo glib 0.22.5 value/impl#[Value]get().::<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 274 | ); |
| 275 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 276 | opt_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().(), |
| 277 | my_vec_manual_from_value.value_typerust-analyzer cargo glib 0.22.5 value/impl#[Value][ToValue]value_type().() |
| 278 | ); |
| 279 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 280 | unsafe { |
| 281 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&opt_value) |
| 282 | .into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][IntoIterator]into_iter().() |
| 283 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>() |
| 284 | }, |
| 285 | unsafe { MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#::from_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][`FromValue<'a>`]from_value().(&opt_value).0rust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#0. } |
| 286 | ); |
| 287 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 288 | unsafe { |
| 289 | Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::from_valuerust-analyzer cargo glib 0.22.5 value/impl#[`Option<T>`][`FromValue<'a>`]from_value().(&my_vec_manual_from_value) |
| 290 | .into_iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][IntoIterator]into_iter().() |
| 291 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>() |
| 292 | }, |
| 293 | unsafe { MyVecManualFromrust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#::from_valuerust-analyzer cargo glib-macros 0.22.6 impl#[MyVecManualFrom][`FromValue<'a>`]from_value().(&my_vec_manual_from_value).0rust-analyzer cargo glib-macros 0.22.6 MyVecManualFrom#0. } |
| 294 | ); |
| 295 | } |