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

Function any_read

src/net/socket_addr_any.rs:336–343  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334
335 #[test]
336 fn any_read() {
337 let localhost = std::net::Ipv6Addr::LOCALHOST;
338 let addr = SocketAddrAny::from(SocketAddrV6::new(localhost, 7, 8, 9));
339 unsafe {
340 let same = SocketAddrAny::read(addr.as_ptr(), addr.addr_len());
341 assert_eq!(addr, same);
342 }
343 }
344}

Callers

nothing calls this directly

Calls 3

readFunction · 0.50
as_ptrMethod · 0.45
addr_lenMethod · 0.45

Tested by

no test coverage detected