Function iota_json::primitive_type
source ยท pub fn primitive_type(
view: &CompiledModule,
type_args: &[TypeTag],
param: &SignatureToken,
) -> (bool, Option<MoveTypeLayout>)
Expand description
Checks if a give SignatureToken represents a primitive type and, if so, returns MoveTypeLayout for this type (if available). The reason we need to return both information about whether a SignatureToken represents a primitive and an Option representing MoveTypeLayout is that there can be signature tokens that represent primitives but that do not have corresponding MoveTypeLayout (e.g., SignatureToken::DatatypeInstantiation).