<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/katex.min.css" integrity="sha384-vlBdW0r3AcZO/HboRPznQNowvexd3fY8qHOWkBi5q7KGgqJ+F48+DceybYmrVbmB" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/katex.min.js" integrity="sha384-AtrdNsnxl/75rvBneBVH7DtOvCxSVahR2zWqle1coBKd8DEmLoviqNeJSx64gNAs" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/contrib/auto-render.min.js" integrity="sha384-bjyGPfbij8/NDKJhSGZNP/khQVgtHUE5exjm4Ydllo42FwIgYsdLO2lXGmRBf5Mz" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
var mathElements = document.getElementsByClassName("rustdoc")[0] || document.body;
var html = mathElements.innerHTML;
function processMath(str) {
var restored = str.replace(/<em[^>]*>/g, "_").replace(/<\/em>/g, "_");
var processed = restored
.replace(/(\\+)_/g, "$1KEEPSUB")
.replace(/(_\{|}_\{)/g, function(m) { return m.replace("_", "KEEPSUB"); })
.replace(/(([a-zA-Z0-9\}]|\\[a-zA-Z]+{[^{}]*})_)([a-zA-Z0-9])(?![a-zA-Z0-9])/g, function(m, p1, p2, p3) {
return p1.replace("_", "KEEPSUB") + p3;
})
.replace(/^(_)([a-zA-Z0-9])(?![a-zA-Z0-9])/g, "KEEPSUB$2");
return processed.replace(/_/g, "\\_").replace(/KEEPSUB/g, "_");
}
function renderMath() {
renderMathInElement(mathElements, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
]
});
}
html = html.replace(/\$\$([\s\S]*?)\$\$/g, function(match, capture) {
return "$$" + processMath(capture) + "$$";
});
html = html.replace(/\$([^\$\s][^\$\n]*?[^\$\s])\$/g, function(match, capture) {
return "$" + processMath(capture) + "$";
});
html = html.replace(/\$([^\$\s\n])\$/g, function(match, capture) {
return "$" + processMath(capture) + "$";
});
mathElements.innerHTML = html;
renderMath();
});
</script>
<style>
.sidebar-crate {
display: flex;
align-items: center;
gap: 1rem;
}
.sidebar-crate h2 {
margin: 0;
}
.logo-container img {
height: 40px;
width: auto;
}
</style>