MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / list_element_info

Function list_element_info

crates/csharp/src/function.rs:2077–2091  ·  view source on GitHub ↗
(ty: &Type)

Source from the content-addressed store, hash-verified

2075}
2076
2077fn list_element_info(ty: &Type) -> (usize, &'static str) {
2078 match ty {
2079 Type::S8 => (1, "sbyte"),
2080 Type::S16 => (2, "short"),
2081 Type::S32 => (4, "int"),
2082 Type::S64 => (8, "long"),
2083 Type::U8 => (1, "byte"),
2084 Type::U16 => (2, "ushort"),
2085 Type::U32 => (4, "uint"),
2086 Type::U64 => (8, "ulong"),
2087 Type::F32 => (4, "float"),
2088 Type::F64 => (8, "double"),
2089 _ => unreachable!(),
2090 }
2091}
2092
2093fn perform_cast(op: &String, cast: &Bitcast) -> String {
2094 match cast {

Callers 1

emitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected