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

Function write

src/backend/linux_raw/io/syscalls.rs:161–165  ·  view source on GitHub ↗
(fd: BorrowedFd<'_>, buf: &[u8])

Source from the content-addressed store, hash-verified

159
160#[inline]
161pub(crate) fn write(fd: BorrowedFd<'_>, buf: &[u8]) -> io::Result<usize> {
162 let (buf_addr, buf_len) = slice(buf);
163
164 unsafe { ret_usize(syscall_readonly!(__NR_write, fd, buf_addr, buf_len)) }
165}
166
167#[inline]
168pub(crate) fn pwrite(fd: BorrowedFd<'_>, buf: &[u8], pos: u64) -> io::Result<usize> {

Callers

nothing calls this directly

Calls 2

sliceFunction · 0.85
ret_usizeFunction · 0.50

Tested by

no test coverage detected