Template:Play/doc

Displays a code block with a link to the Rust playground.

Usage
Use this template similar to the following in your Wiki page:

Pipe character
Code blocks sometimes include the  pipe character, which is the separator between template parameters. There are two ways to insert the character into a template parameter:

Surround your code block with  tags:

Replace every  character with , which will be interpreted as a  :

Playground code
The "Run" button opens the code in the playground. You can also use the  key to wrap the code in a , and the   key to add imports only visible in the playground:

{	"params": { "imports": { "type": "string", "label": "Imports", "description": "Imports are only shown in the playground", "example": "use std::collections::HashMap;" },		"module": { "type": "string", "aliases": [ "0"			],			"label": "Module content", "description": "Types, traits, impls, etc. go here", "suggested": true },		"main": { "type": "string", "label": "The main function body", "description": "This is wrapped in a main function in the playground", "example": "let x = 5;" }	},	"format": "block", "description": "Code black that can be opened in the playground", "paramOrder": [ "imports", "module", "main" ] }