public static RustType parse(Symbol s) {
		char c = s.popChar();

		switch (c) {
			case 'a':
				return new RustType("i8");
			case 'b':
				return new RustType("bool");
			case 'c':
				return new RustType("char");
			case 'd':
				return new RustType("f64");
			case 'e':
				return new RustType("str");
			case 'f':
				return new RustType("f32");
			case 'h':
				return new RustType("u8");
			case 'i':
				return new RustType("isize");
			case 'j':
				return new RustType("usize");
			case 'l':
				return new RustType("i32");
			case 'm':
				return new RustType("u32");
			case 'n':
				return new RustType("i128");
			case 'o':
				return new RustType("u128");
			case 's':
				return new RustType("i16");
			case 't':
				return new RustType("u16");
			case 'u':
				return new RustType("()");
			case 'v':
				return new RustType("...");
			case 'x':
				return new RustType("i64");
			case 'y':
				return new RustType("u64");
			case 'z':
				return new RustType("!");
			case 'p':
				return new RustType("_");
			default:
				switch (c) {
					case 'A': // Array sized
						RustType rustType = RustType.parse(s);
						RustConst constant = RustConst.parse(s);
						return new RustType(
							"[" + rustType.toString() + "; " + constant.toString() + "]");
					case 'S': // Array unsized
						SymbolNode symbolType = RustType.parse(s);
						return new RustType("[" + symbolType.toString() + "]");
					case 'T': // Tuple
						ArrayList<String> types = new ArrayList<String>();

						while (s.nextChar() != 'E') {
							SymbolNode symbolNode = RustType.parse(s);
							if (symbolNode != null) {
								types.add(symbolNode.toString());
							}
							else {
								return null; // null type in parse
							}
						}

						s.popChar();

						String type = "(" + String.join(", ", types) + ")";
						return new RustType(type);
					case 'R': // &T
						RustLifetime.parse(s);
						SymbolNode type1 = RustType.parse(s);
						return new RustType("&" + type1);
					case 'Q': // &mut T
						RustLifetime.parse(s);
						SymbolNode type2 = RustType.parse(s);
						return new RustType("&mut " + type2);
					case 'P': // *const T
						SymbolNode type3 = RustType.parse(s);
						return new RustType("*const " + type3);
					case 'O': // *mut T
						SymbolNode type4 = RustType.parse(s);
						return new RustType("*mut " + type4);
					case 'F': // fn(...) -> ...
						// TODO: FnSig type
					case 'D': // dyn Trait<Assoc = X> + Send + 'a
						String bounds = parseDynBounds(s);
						RustLifetime.parse(s);
						String data = "dyn Trait<Assoc = X>";

						if (bounds != null) {
							data += bounds;
						}

						return new RustType(data);
					case 'B':
						s.backChar();
						String b1 = s.parseBackref();
						int b2 = Integer.parseInt(b1);
						RustBackref b3 = new RustBackref(b2, s);
						return new RustType(new RustPath(b3));
					default:
						s.backChar();
						RustPath path = RustPath.parse(s);
						return new RustType(path);
				}
		}
	}
Parses a rust type from a mangled symbol
@param s symbol to parse
@return the rust type object
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/rust/demangler/RustDemanglerV0.java