@@ -45,6 +45,11 @@ use crate::sys_common::{AsInner, FromInner, IntoInner};
45
45
/// values, encoded in a less-strict variant of UTF-8. This is useful to
46
46
/// understand when handling capacity and length values.
47
47
///
48
+ /// # Capacity of OsString
49
+ ///
50
+ /// Capacity means UTF-8 byte size for OS strings which created from
51
+ /// valid unicode, and not otherwise specified for other contents.
52
+ ///
48
53
/// # Creating an `OsString`
49
54
///
50
55
/// **From a Rust string**: `OsString` implements
@@ -188,6 +193,11 @@ impl OsString {
188
193
///
189
194
/// See main `OsString` documentation information about encoding.
190
195
///
196
+ /// # Notes
197
+ ///
198
+ /// Capacity means UTF-8 byte size for OS strings which created from
199
+ /// valid unicode, and not otherwise specified for other contents.
200
+ ///
191
201
/// # Examples
192
202
///
193
203
/// ```
@@ -231,6 +241,11 @@ impl OsString {
231
241
///
232
242
/// See `OsString` introduction for information about encoding.
233
243
///
244
+ /// # Notes
245
+ ///
246
+ /// Capacity means UTF-8 byte size for OS strings which created from
247
+ /// valid unicode, and not otherwise specified for other contents.
248
+ ///
234
249
/// # Examples
235
250
///
236
251
/// ```
@@ -272,6 +287,11 @@ impl OsString {
272
287
/// greater than or equal to `self.len() + additional`. Does nothing if
273
288
/// capacity is already sufficient.
274
289
///
290
+ /// # Notes
291
+ ///
292
+ /// Capacity means UTF-8 byte size for OS strings which created from
293
+ /// valid unicode, and not otherwise specified for other contents.
294
+ ///
275
295
/// # Errors
276
296
///
277
297
/// If the capacity overflows, or the allocator reports a failure, then an error
@@ -313,6 +333,11 @@ impl OsString {
313
333
///
314
334
/// [`reserve`]: OsString::reserve
315
335
///
336
+ /// # Notes
337
+ ///
338
+ /// Capacity means UTF-8 byte size for OS strings which created from
339
+ /// valid unicode, and not otherwise specified for other contents.
340
+ ///
316
341
/// # Examples
317
342
///
318
343
/// ```
@@ -340,6 +365,11 @@ impl OsString {
340
365
///
341
366
/// [`try_reserve`]: OsString::try_reserve
342
367
///
368
+ /// # Notes
369
+ ///
370
+ /// Capacity means UTF-8 byte size for OS strings which created from
371
+ /// valid unicode, and not otherwise specified for other contents.
372
+ ///
343
373
/// # Errors
344
374
///
345
375
/// If the capacity overflows, or the allocator reports a failure, then an error
@@ -399,6 +429,11 @@ impl OsString {
399
429
///
400
430
/// If the current capacity is less than the lower limit, this is a no-op.
401
431
///
432
+ /// # Notes
433
+ ///
434
+ /// Capacity means UTF-8 byte size for OS strings which created from
435
+ /// valid unicode, and not otherwise specified for other contents.
436
+ ///
402
437
/// # Examples
403
438
///
404
439
/// ```
0 commit comments