MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / splice

Function splice

src/pipe.rs:135–144  ·  view source on GitHub ↗
(
    fd_in: FdIn,
    off_in: Option<&mut u64>,
    fd_out: FdOut,
    off_out: Option<&mut u64>,
    len: usize,
    flags: SpliceFlags,
)

Source from the content-addressed store, hash-verified

133#[cfg(linux_kernel)]
134#[inline]
135pub fn splice<FdIn: AsFd, FdOut: AsFd>(
136 fd_in: FdIn,
137 off_in: Option<&mut u64>,
138 fd_out: FdOut,
139 off_out: Option<&mut u64>,
140 len: usize,
141 flags: SpliceFlags,
142) -> io::Result<usize> {
143 backend::pipe::syscalls::splice(fd_in.as_fd(), off_in, fd_out.as_fd(), off_out, len, flags)
144}
145
146/// `vmsplice(fd, bufs, flags)`—Transfer data between memory and a pipe.
147///

Callers 3

test_splice_cursorFunction · 0.50
test_splice_offsetFunction · 0.50
test_splice_pipe2pipeFunction · 0.50

Calls 1

as_fdMethod · 0.45

Tested by 3

test_splice_cursorFunction · 0.40
test_splice_offsetFunction · 0.40
test_splice_pipe2pipeFunction · 0.40