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

Method as_slice

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

Source from the content-addressed store, hash-verified

3180 }
3181 impl MibTable {
3182 fn as_slice(&self) -> &[IpHelper::MIB_IF_ROW2] {
3183 unsafe {
3184 let p = self.ptr.as_ptr();
3185 let ptr = &raw const (*p).Table as *const IpHelper::MIB_IF_ROW2;
3186 core::slice::from_raw_parts(ptr, (*p).NumEntries as usize)
3187 }
3188 }
3189 }
3190 impl Drop for MibTable {
3191 fn drop(&mut self) {

Callers 1

if_nameindexFunction · 0.45

Calls 1

as_ptrMethod · 0.45

Tested by

no test coverage detected