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

Method item_size

crates/stdlib/src/array.rs:1552–1559  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1550 }
1551 }
1552 const fn item_size(self) -> usize {
1553 match self {
1554 Self::Int8 { .. } => 1,
1555 Self::Int16 { .. } | Self::Utf16 { .. } => 2,
1556 Self::Int32 { .. } | Self::Utf32 { .. } | Self::Ieee754Float { .. } => 4,
1557 Self::Int64 { .. } | Self::Ieee754Double { .. } => 8,
1558 }
1559 }
1560 }
1561
1562 fn check_array_type(typ: PyTypeRef, vm: &VirtualMachine) -> PyResult<PyTypeRef> {

Callers 1

_array_reconstructorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected