wiwi_chain/
string.rs

1use crate::Output;
2
3crate::decl_chain! {
4	struct StringChain;
5	inner String;
6}
7
8crate::decl_chain! {
9	struct StringMutChain['h];
10	impl['h] StringMutChain<'h>;
11	inner &'h mut String;
12}
13
14crate::impl_chain_conversions! {
15	impl chain [] StringChain;
16	impl chain_mut ['h] StringMutChain<'h>;
17	impl inner [] String;
18	type inner String;
19	type mut_chain StringMutChain<'mut_chain>;
20}
21
22crate::chain_fns! {
23	impl chain [] StringChain;
24	impl chain_mut ['h] StringMutChain<'h>;
25
26	// as_ascii
27	// as_bytes
28	// as_bytes_mut
29	// as_ptr
30	// as_mut_ptr
31	// as_mut_str
32	// as_mut_vec
33	// as_str
34	// bytes
35	// capacity
36	// ceil_char_boundary
37	// char_indices
38	// chars
39
40	underlying_fn "String::clear"
41	fn clear(inner) {
42		inner.clear();
43	}
44
45	// contains
46	// drain
47	// encode_utf16
48	// ends_with
49	// eq_ignore_ascii_case
50	// escape_debug
51	// escape_default
52	// escape_unicode
53	// extend_from_within
54	// find
55	// floor_char_boundary
56	// from_raw_parts
57	// from_utf8
58	// from_utf8_lossy
59	// from_utf8_lossy_owned
60	// from_utf8_unchecked
61	// from_utf16
62	// from_utf16_lossy
63	// from_utf16be
64	// from_utf16be_lossy
65	// from_utf16le
66	// from_utf16le_lossy
67	// get
68	// get_mut
69	// get_unchecked
70	// get_unchecked_mut
71	// insert
72	// insert_str
73	// into_boxed_str
74	// into_bytes
75	// into_chars
76	// into_raw_parts
77	// is_ascii
78	// is_char_boundary
79	// is_empty
80	// is_empty
81	// leak
82
83	underlying_fn "String::len"
84	fn len(inner, out: impl Output<usize>) {
85		out.write(inner.len())
86	}
87
88	// lines
89	// lines_any
90	// make_ascii_lowercase
91	// make_ascii_uppercase
92	// match_indices
93	// matches
94	// parse
95	// pop
96
97	underlying_fn "String::push"
98	fn push(inner, ch: char) {
99		inner.push(ch)
100	}
101
102	underlying_fn "String::push_str"
103	fn push_str(inner, string: &str) {
104		inner.push_str(string)
105	}
106
107	// remove
108	// remove_matches
109	// repeat
110	// replace
111	// replace_range
112	// replacen
113
114	underlying_fn "String::reserve"
115	fn reserve(inner, additional: usize) {
116		inner.reserve(additional)
117	}
118
119	underlying_fn "String::reserve_exact"
120	fn reserve_exact(inner, additional: usize) {
121		inner.reserve_exact(additional)
122	}
123
124	underlying_fn "String::retain"
125	fn retain(inner, f: impl FnMut(char) -> bool) {
126		inner.retain(f)
127	}
128
129	// rfind
130	// rmatch_indices
131	// rmatches
132	// rsplit
133	// rsplit_once
134	// rsplit_terminator
135	// rsplitn
136	// shrink_to
137	// shrink_to_fit
138	// slice_mut_unchecked
139	// slice_unchecked
140	// split_inclusive
141	// split
142	// split_ascii_whitespace
143	// split_at
144	// split_at_checked
145	// split_at_mut
146	// split_at_mut_checked
147	// split_off
148	// split_once
149	// split_terminator
150	// split_whitespace
151	// splitn
152	// starts_with
153	// strip_prefix
154	// strip_suffix
155	// substr_range
156	// to_ascii_lowercase
157	// to_ascii_uppercase
158	// to_lowercase
159	// to_uppercase
160	// trim
161	// trim_ascii
162	// trim_ascii_end
163	// trim_ascii_start
164	// trim_end
165	// trim_end_matches
166	// trim_left
167	// trim_left_matches
168	// trim_matches
169	// trim_right
170	// trim_right_matches
171	// trim_start
172	// trim_start_matches
173	// truncate
174	// try_reserve
175	// try_reserve_exact
176	// try_with_capacity
177	// with_capacity
178}
179
180/*
181Trait Implementations
182Add<&str>
183AddAssign<&str>
184AsMut<str>
185AsRef<OsStr>
186AsRef<Path>
187AsRef<[u8]>
188AsRef<str>
189Borrow<str>
190BorrowMut<str>
191Clone
192Debug
193Default
194Deref
195DerefMut
196DerefPure
197Display
198Eq
199Extend<&'a AsciiChar>
200Extend<&'a char>
201Extend<&'a str>
202Extend<AsciiChar>
203Extend<Box<str, A>>
204Extend<Cow<'a, str>>
205Extend<String>
206Extend<char>
207From<&'a String>
208From<&String>
209From<&mut str>
210From<&str>
211From<Box<str>>
212From<Cow<'a, str>>
213From<String>
214From<String>
215From<String>
216From<String>
217From<String>
218From<String>
219From<String>
220From<String>
221From<String>
222From<char>
223FromIterator<&'a char>
224FromIterator<&'a str>
225FromIterator<Box<str, A>>
226FromIterator<Cow<'a, str>>
227FromIterator<String>
228FromIterator<String>
229FromIterator<String>
230FromIterator<char>
231FromStr
232Hash
233Index<I>
234IndexMut<I>
235Ord
236PartialEq
237PartialEq<&'a str>
238PartialEq<ByteStr>
239PartialEq<ByteString>
240PartialEq<Cow<'a, str>>
241PartialEq<String>
242PartialEq<String>
243PartialEq<String>
244PartialEq<String>
245PartialEq<String>
246PartialEq<str>
247PartialOrd
248Pattern
249StructuralPartialEq
250ToSocketAddrs
251TryFrom<&'a ByteStr>
252TryFrom<ByteString>
253TryFrom<CString>
254TryFrom<Vec<u8>>
255Write
256*/