OsString: Consolidate all documentation about capacity in top-level docs
This commit is contained in:
parent
6506df7f65
commit
81e21080b6
@ -191,12 +191,7 @@ pub fn push<T: AsRef<OsStr>>(&mut self, s: T) {
|
||||
/// OS strings without reallocating. If `capacity` is 0, the string will not
|
||||
/// allocate.
|
||||
///
|
||||
/// See main `OsString` documentation information about encoding.
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Capacity means UTF-8 byte size for OS strings which created from
|
||||
/// valid unicode, and not otherwise specified for other contents.
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -239,12 +234,7 @@ pub fn clear(&mut self) {
|
||||
|
||||
/// Returns the capacity this `OsString` can hold without reallocating.
|
||||
///
|
||||
/// See `OsString` introduction for information about encoding.
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Capacity means UTF-8 byte size for OS strings which created from
|
||||
/// valid unicode, and not otherwise specified for other contents.
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -266,6 +256,8 @@ pub fn capacity(&self) -> usize {
|
||||
///
|
||||
/// The collection may reserve more space to avoid frequent reallocations.
|
||||
///
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@ -287,10 +279,7 @@ pub fn reserve(&mut self, additional: usize) {
|
||||
/// greater than or equal to `self.len() + additional`. Does nothing if
|
||||
/// capacity is already sufficient.
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Capacity means UTF-8 byte size for OS strings which created from
|
||||
/// valid unicode, and not otherwise specified for other contents.
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
@ -333,10 +322,7 @@ pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
|
||||
///
|
||||
/// [`reserve`]: OsString::reserve
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Capacity means UTF-8 byte size for OS strings which created from
|
||||
/// valid unicode, and not otherwise specified for other contents.
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -365,10 +351,7 @@ pub fn reserve_exact(&mut self, additional: usize) {
|
||||
///
|
||||
/// [`try_reserve`]: OsString::try_reserve
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Capacity means UTF-8 byte size for OS strings which created from
|
||||
/// valid unicode, and not otherwise specified for other contents.
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
@ -403,6 +386,8 @@ pub fn try_reserve_exact(&mut self, additional: usize) -> Result<(), TryReserveE
|
||||
|
||||
/// Shrinks the capacity of the `OsString` to match its length.
|
||||
///
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@ -429,10 +414,7 @@ pub fn shrink_to_fit(&mut self) {
|
||||
///
|
||||
/// If the current capacity is less than the lower limit, this is a no-op.
|
||||
///
|
||||
/// # Notes
|
||||
///
|
||||
/// Capacity means UTF-8 byte size for OS strings which created from
|
||||
/// valid unicode, and not otherwise specified for other contents.
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -808,6 +790,8 @@ pub fn is_empty(&self) -> bool {
|
||||
/// This number is simply useful for passing to other methods, like
|
||||
/// [`OsString::with_capacity`] to avoid reallocations.
|
||||
///
|
||||
/// See the main `OsString` documentation information about encoding and capacity units.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user