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

Function ttyname

src/termios/tty.rs:45–47  ·  view source on GitHub ↗
(fd: Fd, reuse: B)

Source from the content-addressed store, hash-verified

43#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
44#[inline]
45pub fn ttyname<Fd: AsFd, B: Into<Vec<u8>>>(fd: Fd, reuse: B) -> io::Result<CString> {
46 _ttyname(fd.as_fd(), reuse.into())
47}
48
49#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))]
50#[cfg(feature = "alloc")]

Callers 2

_ttynameFunction · 0.70
test_ttyname_okFunction · 0.50

Calls 2

_ttynameFunction · 0.85
as_fdMethod · 0.45

Tested by 1

test_ttyname_okFunction · 0.40