"keyword",
"existential",
"attr",
- "derive"];
+ "derive",
+ "traitalias"];
var search_input = document.getElementsByClassName("search-input")[0];
}
function browserSupportsHistoryApi() {
- return document.location.protocol != "file:" &&
- window.history && typeof window.history.pushState === "function";
+ return window.history && typeof window.history.pushState === "function";
}
var main = document.getElementById("main");
block("type", "Type Definitions");
block("foreigntype", "Foreign Types");
block("keyword", "Keywords");
+ block("traitalias", "Trait Aliases");
}
window.initSidebarItems = initSidebarItems;
};
}
- function implHider(addOrRemove) {
+ function implHider(addOrRemove, fullHide) {
return function(n) {
- var is_method = hasClass(n, "method");
+ var is_method = hasClass(n, "method") || fullHide;
if (is_method || hasClass(n, "type")) {
if (is_method === true) {
if (addOrRemove) {
}
}
} else {
- // we are collapsing the impl block
+ // we are collapsing the impl block(s).
var parentElem = toggle.parentNode;
relatedDoc = parentElem;
return;
}
- // Hide all functions, but not associated types/consts
+ // Hide all functions, but not associated types/consts.
if (mode === "toggle") {
if (hasClass(relatedDoc, "fns-now-collapsed") ||
}
}
+ var dontApplyBlockRule = toggle.parentNode.parentNode.id !== "main";
if (action === "show") {
removeClass(relatedDoc, "fns-now-collapsed");
removeClass(docblock, "hidden-by-usual-hider");
- onEachLazy(toggle.childNodes, adjustToggle(false));
- onEachLazy(relatedDoc.childNodes, implHider(false));
+ onEachLazy(toggle.childNodes, adjustToggle(false, dontApplyBlockRule));
+ onEachLazy(relatedDoc.childNodes, implHider(false, dontApplyBlockRule));
} else if (action === "hide") {
addClass(relatedDoc, "fns-now-collapsed");
addClass(docblock, "hidden-by-usual-hider");
- onEachLazy(toggle.childNodes, adjustToggle(true));
- onEachLazy(relatedDoc.childNodes, implHider(true));
+ onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule));
+ onEachLazy(relatedDoc.childNodes, implHider(true, dontApplyBlockRule));
}
}
}