pub trait ExtendFromWithinUnchecked {
// Required method
unsafe fn extend_from_within_unchecked<R>(&mut self, src: R)
where R: RangeBounds<usize>;
}
Expand description
A trait for extend_from_within
without the capacity and bounds checks.
Required Methods§
Sourceunsafe fn extend_from_within_unchecked<R>(&mut self, src: R)where
R: RangeBounds<usize>,
unsafe fn extend_from_within_unchecked<R>(&mut self, src: R)where
R: RangeBounds<usize>,
Copies elements from src
range to the end of the collection
without the capacity check and the bounds check for the range.
§Safety
src
must be a valid index for the collection.
The capacity of the collection must be sufficient for the new items.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.