File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 11
11
12
12
extension Slice where Base == UnsafeMutableRawBufferPointer {
13
13
14
- /// Copies the bytes from the given buffer to this buffer slice's memory.
15
- ///
16
- /// If the `source.count` bytes of memory referenced by this buffer are bound
17
- /// to a type `T`, then `T` must be a trivial type, the underlying pointer
18
- /// must be properly aligned for accessing `T`, and `source.count` must be a
19
- /// multiple of `MemoryLayout<T>.stride`.
20
- ///
21
- /// The memory referenced by `source` may overlap with the memory referenced
22
- /// by this buffer.
23
- ///
24
- /// After calling `copyMemory(from:)`, the first `source.count` bytes of
25
- /// memory referenced by this buffer are initialized to raw bytes. If the
26
- /// memory is bound to type `T`, then it contains values of type `T`.
27
- ///
28
- /// - Parameter source: A buffer of raw bytes. `source.count` must
29
- /// be less than or equal to this buffer slice's `count`.
30
- @inlinable
31
- @_alwaysEmitIntoClient
32
- func copyMemory( from source: UnsafeRawBufferPointer ) {
33
- let buffer = Base ( rebasing: self )
34
- buffer. copyMemory ( from: source)
35
- }
36
-
37
14
/// Copies from a collection of `UInt8` into this buffer slice's memory.
38
15
///
39
16
/// If the `source.count` bytes of memory referenced by this buffer are bound
You can’t perform that action at this time.
0 commit comments