Lines Matching refs:try_reserve
1062 /// frequent reallocations. After calling `try_reserve`, capacity will be
1081 /// output.try_reserve(data.len())?;
1092 #[stable(feature = "try_reserve", since = "1.57.0")]
1093 pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError> {
1094 self.buf.try_reserve(self.len, additional)
1098 /// elements to be inserted in the given `Vec<T>`. Unlike [`try_reserve`],
1106 /// minimal. Prefer [`try_reserve`] if future insertions are expected.
1108 /// [`try_reserve`]: Vec::try_reserve
1135 #[stable(feature = "try_reserve", since = "1.57.0")]
1983 /// The caller should use [`reserve`] or [`try_reserve`] to ensure that there is enough capacity.
1987 /// [`try_reserve`]: Vec::try_reserve
2001 /// vec.try_reserve(1)?;
2092 self.try_reserve(count)?;
2721 self.try_reserve(n)?;
3071 self.try_reserve(lower.saturating_add(1))?;
3130 self.try_reserve(additional)?;