MCPcopy Index your code
hub / github.com/RustPython/RustPython / fileno

Method fileno

crates/stdlib/src/socket.rs:2187–2192  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2185
2186 #[pymethod]
2187 fn fileno(&self) -> i64 {
2188 self.sock
2189 .read()
2190 .as_ref()
2191 .map_or(INVALID_SOCKET as i64, |s| sock_fileno(s) as i64)
2192 }
2193
2194 #[pymethod]
2195 fn getsockname(&self, vm: &VirtualMachine) -> std::io::Result<PyObjectRef> {

Callers

nothing calls this directly

Calls 3

sock_filenoFunction · 0.85
as_refMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected