• Home
  • Raw
  • Download

Lines Matching refs:SmallCString

8 pub(crate) struct SmallCString(smallvec::SmallVec<[u8; 16]>);  struct
10 impl SmallCString { impl
88 impl Default for SmallCString { implementation
95 impl std::fmt::Debug for SmallCString { implementation
101 impl std::ops::Deref for SmallCString { implementation
109 impl PartialEq<SmallCString> for str {
111 fn eq(&self, s: &SmallCString) -> bool { in eq()
116 impl PartialEq<str> for SmallCString { implementation
123 impl std::borrow::Borrow<str> for SmallCString { implementation
138 assert_eq!(SmallCString::default().0, SmallCString::new("").unwrap().0); in test_small_cstring()
139 assert_eq!(SmallCString::new("foo").unwrap().len(), 3); in test_small_cstring()
141 SmallCString::new("foo").unwrap().as_bytes_with_nul(), in test_small_cstring()
145 SmallCString::new("foo").unwrap().as_bytes_without_nul(), in test_small_cstring()
149 assert_eq!(SmallCString::new("��").unwrap().len(), 4); in test_small_cstring()
151 SmallCString::new("��").unwrap().0.as_slice(), in test_small_cstring()
155 SmallCString::new("��").unwrap().as_bytes_without_nul(), in test_small_cstring()
159 assert_eq!(SmallCString::new("").unwrap().len(), 0); in test_small_cstring()
160 assert!(SmallCString::new("").unwrap().is_empty()); in test_small_cstring()
162 assert_eq!(SmallCString::new("").unwrap().0.as_slice(), b"\0"); in test_small_cstring()
163 assert_eq!(SmallCString::new("").unwrap().as_bytes_without_nul(), b""); in test_small_cstring()
165 assert!(SmallCString::new("\0").is_err()); in test_small_cstring()
166 assert!(SmallCString::new("\0abc").is_err()); in test_small_cstring()
167 assert!(SmallCString::new("abc\0").is_err()); in test_small_cstring()