Lines Matching refs:GString

24 pub enum GString {  enum
30 unsafe impl Send for GString {} implementation
31 unsafe impl Sync for GString {} implementation
33 impl GString { impl
36 GString::Owned(ptr, libc::strlen(ptr)) in new()
41 GString::Borrowed(ptr, libc::strlen(ptr)) in new_borrowed()
46 GString::Borrowed(ptr, length) => unsafe { in as_str()
50 GString::Owned(ptr, length) => unsafe { in as_str()
54 GString::ForeignOwned(cstring) => cstring in as_str()
63 impl Drop for GString { implementation
65 if let GString::Owned(ptr, _len) = self { in drop()
73 impl fmt::Display for GString { implementation
79 impl hash::Hash for GString { implementation
82 GString::Borrowed(ptr, length) => unsafe { in hash()
85 GString::Owned(ptr, length) => unsafe { in hash()
88 GString::ForeignOwned(cstring) => cstring in hash()
97 impl Borrow<str> for GString { implementation
103 impl Ord for GString { implementation
104 fn cmp(&self, other: &GString) -> Ordering { in cmp()
109 impl PartialOrd for GString { implementation
110 fn partial_cmp(&self, other: &GString) -> Option<Ordering> { in partial_cmp()
115 impl PartialEq for GString { implementation
116 fn eq(&self, other: &GString) -> bool { in eq()
121 impl PartialEq<GString> for String {
122 fn eq(&self, other: &GString) -> bool { in eq()
127 impl PartialEq<str> for GString { implementation
133 impl<'a> PartialEq<&'a str> for GString { implementation
139 impl<'a> PartialEq<GString> for &'a str {
140 fn eq(&self, other: &GString) -> bool { in eq()
145 impl PartialEq<String> for GString { implementation
151 impl PartialEq<GString> for str {
152 fn eq(&self, other: &GString) -> bool { in eq()
157 impl PartialOrd<GString> for String {
158 fn partial_cmp(&self, other: &GString) -> Option<Ordering> { in partial_cmp()
163 impl PartialOrd<String> for GString { implementation
169 impl PartialOrd<GString> for str {
170 fn partial_cmp(&self, other: &GString) -> Option<Ordering> { in partial_cmp()
175 impl PartialOrd<str> for GString { implementation
181 impl Eq for GString {} implementation
183 impl AsRef<str> for GString { implementation
189 impl AsRef<OsStr> for GString { implementation
195 impl Deref for GString { implementation
203 impl From<GString> for String {
205 fn from(mut s: GString) -> Self { in from()
206 if let GString::ForeignOwned(ref mut cstring) = s { in from()
219 impl From<GString> for Box<str> {
221 fn from(s: GString) -> Self { in from()
227 impl From<String> for GString { implementation
234 impl From<Box<str>> for GString { implementation
241 impl<'a> From<&'a str> for GString { implementation
248 impl From<Vec<u8>> for GString { implementation
256 impl From<CString> for GString { implementation
259 GString::ForeignOwned(Some(s)) in from()
263 impl<'a> From<&'a CStr> for GString { implementation
271 impl FromGlibPtrFull<*const c_char> for GString { implementation
274 GString::new(ptr as *mut _) in from_glib_full()
279 impl FromGlibPtrFull<*mut u8> for GString { implementation
282 GString::new(ptr as *mut _) in from_glib_full()
287 impl FromGlibPtrFull<*mut i8> for GString { implementation
290 GString::new(ptr as *mut _) in from_glib_full()
295 impl FromGlibPtrNone<*const c_char> for GString { implementation
304 impl FromGlibPtrNone<*mut u8> for GString { implementation
313 impl FromGlibPtrNone<*mut i8> for GString { implementation
322 impl FromGlibPtrBorrow<*const c_char> for GString { implementation
325 GString::new_borrowed(ptr) in from_glib_borrow()
330 impl FromGlibPtrBorrow<*mut u8> for GString { implementation
333 GString::new_borrowed(ptr as *const c_char) in from_glib_borrow()
338 impl FromGlibPtrBorrow<*mut i8> for GString { implementation
341 GString::new_borrowed(ptr as *const c_char) in from_glib_borrow()
346 impl<'a> ToGlibPtr<'a, *const c_char> for GString { implementation
364 impl<'a> ToGlibPtr<'a, *mut c_char> for GString { implementation
381 impl GlibPtrDefault for GString { implementation
385 impl StaticType for GString { implementation
391 impl StaticType for Vec<GString> {
397 impl<'a> FromValueOptional<'a> for GString { implementation
404 Some(GString::new(ptr)) in from_value_optional()
409 impl SetValue for GString { implementation
415 impl SetValueOptional for GString { implementation
421 impl_from_glib_container_as_vec_string!(GString, *const c_char);
422 impl_from_glib_container_as_vec_string!(GString, *mut c_char);
427 use gstring::GString;
437 let gstring = GString::new(ptr_copy); in test_gstring()
450 let gstr = GString::new(ptr_copy); in test_owned_glib_string()
457 let gstring: GString = "foo".into(); in test_gstring_from_str()
466 let gstring = GString::from(cstr); in test_gstring_from_cstring()
475 let gstring = GString::from(cstr); in test_string_from_gstring()
484 let s: GString = Vec::from(v).into(); in test_vec_u8_to_gstring()
493 let gstring = GString::from(cstr); in test_hashmap()
495 let mut h: HashMap<GString, i32> = HashMap::new(); in test_hashmap()
497 let gstring: GString = "foo".into(); in test_hashmap()