commit 09a76ed9f1f9dc464a394292b52a9de8a0b3ad02 Author: Sarsoo Date: Sat Jun 26 20:15:29 2021 +0000 deploy: 3734d68a6473869ca15938034811afc3666d6434 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/4d68ea94c77e642d94c7.module.wasm b/4d68ea94c77e642d94c7.module.wasm new file mode 100644 index 0000000..7e7abe5 Binary files /dev/null and b/4d68ea94c77e642d94c7.module.wasm differ diff --git a/bootstrap.js b/bootstrap.js new file mode 100644 index 0000000..f1cd41e --- /dev/null +++ b/bootstrap.js @@ -0,0 +1,379 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./bootstrap.js": +/*!**********************!*\ + !*** ./bootstrap.js ***! + \**********************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + +eval("// A dependency graph that contains any wasm must all be imported\n// asynchronously. This `bootstrap.js` file does the single async import, so\n// that no one else needs to worry about it again.\n__webpack_require__.e(/*! import() */ \"index_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./index.js */ \"./index.js\"))\n .catch(e => console.error(\"Error importing `index.js`:\", e));\n\n\n//# sourceURL=webpack://draught/./bootstrap.js?"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/async module */ +/******/ (() => { +/******/ var webpackThen = typeof Symbol === "function" ? Symbol("webpack then") : "__webpack_then__"; +/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__"; +/******/ var completeQueue = (queue) => { +/******/ if(queue) { +/******/ queue.forEach((fn) => (fn.r--)); +/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn())); +/******/ } +/******/ } +/******/ var completeFunction = (fn) => (!--fn.r && fn()); +/******/ var queueFunction = (queue, fn) => (queue ? queue.push(fn) : completeFunction(fn)); +/******/ var wrapDeps = (deps) => (deps.map((dep) => { +/******/ if(dep !== null && typeof dep === "object") { +/******/ if(dep[webpackThen]) return dep; +/******/ if(dep.then) { +/******/ var queue = []; +/******/ dep.then((r) => { +/******/ obj[webpackExports] = r; +/******/ completeQueue(queue); +/******/ queue = 0; +/******/ }); +/******/ var obj = { [webpackThen]: (fn, reject) => (queueFunction(queue, fn), dep.catch(reject)) }; +/******/ return obj; +/******/ } +/******/ } +/******/ return { [webpackThen]: (fn) => (completeFunction(fn)), [webpackExports]: dep }; +/******/ })); +/******/ __webpack_require__.a = (module, body, hasAwait) => { +/******/ var queue = hasAwait && []; +/******/ var exports = module.exports; +/******/ var currentDeps; +/******/ var outerResolve; +/******/ var reject; +/******/ var isEvaluating = true; +/******/ var nested = false; +/******/ var whenAll = (deps, onResolve, onReject) => { +/******/ if (nested) return; +/******/ nested = true; +/******/ onResolve.r += deps.length; +/******/ deps.map((dep, i) => (dep[webpackThen](onResolve, onReject))); +/******/ nested = false; +/******/ }; +/******/ var promise = new Promise((resolve, rej) => { +/******/ reject = rej; +/******/ outerResolve = () => (resolve(exports), completeQueue(queue), queue = 0); +/******/ }); +/******/ promise[webpackExports] = exports; +/******/ promise[webpackThen] = (fn, rejectFn) => { +/******/ if (isEvaluating) { return completeFunction(fn); } +/******/ if (currentDeps) whenAll(currentDeps, fn, rejectFn); +/******/ queueFunction(queue, fn); +/******/ promise.catch(rejectFn); +/******/ }; +/******/ module.exports = promise; +/******/ body((deps) => { +/******/ if(!deps) return outerResolve(); +/******/ currentDeps = wrapDeps(deps); +/******/ var fn, result; +/******/ var promise = new Promise((resolve, reject) => { +/******/ fn = () => (resolve(result = currentDeps.map((d) => (d[webpackExports])))); +/******/ fn.r = 0; +/******/ whenAll(currentDeps, fn, reject); +/******/ }); +/******/ return fn.r ? promise : result; +/******/ }).then(outerResolve, reject); +/******/ isEvaluating = false; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".bootstrap.js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/harmony module decorator */ +/******/ (() => { +/******/ __webpack_require__.hmd = (module) => { +/******/ module = Object.create(module); +/******/ if (!module.children) module.children = []; +/******/ Object.defineProperty(module, 'exports', { +/******/ enumerable: true, +/******/ set: () => { +/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id); +/******/ } +/******/ }); +/******/ return module; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ var dataWebpackPrefix = "draught:"; +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ script.timeout = 120; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key); +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ ; +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript) +/******/ scriptUrl = document.currentScript.src +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) scriptUrl = scripts[scripts.length - 1].src +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "main": 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); +/******/ } else installedChunks[chunkId] = 0; +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkIds[i]] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunkdraught"] = self["webpackChunkdraught"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/******/ /* webpack/runtime/wasm chunk loading */ +/******/ (() => { +/******/ __webpack_require__.v = (exports, wasmModuleId, wasmModuleHash, importsObj) => { +/******/ var req = fetch(__webpack_require__.p + "" + wasmModuleHash + ".module.wasm"); +/******/ if (typeof WebAssembly.instantiateStreaming === 'function') { +/******/ return WebAssembly.instantiateStreaming(req, importsObj) +/******/ .then((res) => (Object.assign(exports, res.instance.exports))); +/******/ } +/******/ return req +/******/ .then((x) => (x.arrayBuffer())) +/******/ .then((bytes) => (WebAssembly.instantiate(bytes, importsObj))) +/******/ .then((res) => (Object.assign(exports, res.instance.exports))); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module can't be inlined because the eval devtool is used. +/******/ var __webpack_exports__ = __webpack_require__("./bootstrap.js"); +/******/ +/******/ })() +; \ No newline at end of file diff --git a/doc/.lock b/doc/.lock new file mode 100755 index 0000000..e69de29 diff --git a/doc/COPYRIGHT.txt b/doc/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/doc/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/doc/FiraSans-LICENSE.txt b/doc/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/doc/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/doc/FiraSans-Medium.woff b/doc/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/doc/FiraSans-Medium.woff differ diff --git a/doc/FiraSans-Medium.woff2 b/doc/FiraSans-Medium.woff2 new file mode 100644 index 0000000..7a1e5fc Binary files /dev/null and b/doc/FiraSans-Medium.woff2 differ diff --git a/doc/FiraSans-Regular.woff b/doc/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/doc/FiraSans-Regular.woff differ diff --git a/doc/FiraSans-Regular.woff2 b/doc/FiraSans-Regular.woff2 new file mode 100644 index 0000000..e766e06 Binary files /dev/null and b/doc/FiraSans-Regular.woff2 differ diff --git a/doc/LICENSE-APACHE.txt b/doc/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/doc/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/doc/LICENSE-MIT.txt b/doc/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/doc/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/doc/SourceCodePro-LICENSE.txt b/doc/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/doc/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/doc/SourceCodePro-Regular.woff b/doc/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/doc/SourceCodePro-Regular.woff differ diff --git a/doc/SourceCodePro-Semibold.woff b/doc/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/doc/SourceCodePro-Semibold.woff differ diff --git a/doc/SourceSerifPro-Bold.ttf.woff b/doc/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/doc/SourceSerifPro-Bold.ttf.woff differ diff --git a/doc/SourceSerifPro-It.ttf.woff b/doc/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/doc/SourceSerifPro-It.ttf.woff differ diff --git a/doc/SourceSerifPro-LICENSE.md b/doc/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/doc/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/doc/SourceSerifPro-Regular.ttf.woff b/doc/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/doc/SourceSerifPro-Regular.ttf.woff differ diff --git a/doc/ayu.css b/doc/ayu.css new file mode 100644 index 0000000..77e6843 --- /dev/null +++ b/doc/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/doc/brush.svg b/doc/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/doc/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/doc/crates.js b/doc/crates.js new file mode 100644 index 0000000..a6c5057 --- /dev/null +++ b/doc/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["draught"]; \ No newline at end of file diff --git a/doc/dark.css b/doc/dark.css new file mode 100644 index 0000000..8ee9c65 --- /dev/null +++ b/doc/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/doc/down-arrow.svg b/doc/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/doc/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/doc/draught/all.html b/doc/draught/all.html new file mode 100644 index 0000000..35a9958 --- /dev/null +++ b/doc/draught/all.html @@ -0,0 +1,7 @@ +List of all items in this crate + +

List of all items[] + +

Structs

Enums

Macros

Functions

Constants

+ \ No newline at end of file diff --git a/doc/draught/board/constant.STD_HEIGHT.html b/doc/draught/board/constant.STD_HEIGHT.html new file mode 100644 index 0000000..2d99cc7 --- /dev/null +++ b/doc/draught/board/constant.STD_HEIGHT.html @@ -0,0 +1,5 @@ +draught::board::STD_HEIGHT - Rust + +

Constant draught::board::STD_HEIGHT[][src]

pub const STD_HEIGHT: usize = 8;
+ \ No newline at end of file diff --git a/doc/draught/board/constant.STD_WIDTH.html b/doc/draught/board/constant.STD_WIDTH.html new file mode 100644 index 0000000..456cf81 --- /dev/null +++ b/doc/draught/board/constant.STD_WIDTH.html @@ -0,0 +1,5 @@ +draught::board::STD_WIDTH - Rust + +

Constant draught::board::STD_WIDTH[][src]

pub const STD_WIDTH: usize = 8;
+ \ No newline at end of file diff --git a/doc/draught/board/enums/enum.Moveable.html b/doc/draught/board/enums/enum.Moveable.html new file mode 100644 index 0000000..66ddd89 --- /dev/null +++ b/doc/draught/board/enums/enum.Moveable.html @@ -0,0 +1,45 @@ +draught::board::enums::Moveable - Rust + +

Enum draught::board::enums::Moveable[][src]

#[repr(u8)]pub enum Moveable {
+    Allowed,
+    Occupied,
+    OutOfBounds,
+}

+ Variants

+
Allowed
Occupied
OutOfBounds

Trait Implementations

impl Clone for Moveable[src]

impl Copy for Moveable[src]

impl Debug for Moveable[src]

impl Eq for Moveable[src]

impl FromWasmAbi for Moveable[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Moveable[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Moveable[src]

impl OptionIntoWasmAbi for Moveable[src]

impl PartialEq<Moveable> for Moveable[src]

impl StructuralEq for Moveable[src]

impl StructuralPartialEq for Moveable[src]

impl WasmDescribe for Moveable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/enums/enum.SquareState.html b/doc/draught/board/enums/enum.SquareState.html new file mode 100644 index 0000000..0f54984 --- /dev/null +++ b/doc/draught/board/enums/enum.SquareState.html @@ -0,0 +1,47 @@ +draught::board::enums::SquareState - Rust + +

Enum draught::board::enums::SquareState[][src]

#[repr(u8)]pub enum SquareState {
+    Empty,
+    Occupied,
+    Unplayable,
+}

+ Variants

+
Empty
Occupied
Unplayable

Trait Implementations

impl Clone for SquareState[src]

impl Copy for SquareState[src]

impl Debug for SquareState[src]

impl Display for SquareState[src]

impl Eq for SquareState[src]

impl FromWasmAbi for SquareState[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for SquareState[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for SquareState[src]

impl OptionIntoWasmAbi for SquareState[src]

impl PartialEq<SquareState> for SquareState[src]

impl StructuralEq for SquareState[src]

impl StructuralPartialEq for SquareState[src]

impl WasmDescribe for SquareState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/enums/enum.Strength.html b/doc/draught/board/enums/enum.Strength.html new file mode 100644 index 0000000..f5ccff0 --- /dev/null +++ b/doc/draught/board/enums/enum.Strength.html @@ -0,0 +1,44 @@ +draught::board::enums::Strength - Rust + +

Enum draught::board::enums::Strength[][src]

#[repr(u8)]pub enum Strength {
+    Man,
+    King,
+}

+ Variants

+
Man
King

Trait Implementations

impl Clone for Strength[src]

impl Copy for Strength[src]

impl Debug for Strength[src]

impl Eq for Strength[src]

impl FromWasmAbi for Strength[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Strength[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Strength[src]

impl OptionIntoWasmAbi for Strength[src]

impl PartialEq<Strength> for Strength[src]

impl StructuralEq for Strength[src]

impl StructuralPartialEq for Strength[src]

impl WasmDescribe for Strength[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/enums/enum.Team.html b/doc/draught/board/enums/enum.Team.html new file mode 100644 index 0000000..9bdbf0a --- /dev/null +++ b/doc/draught/board/enums/enum.Team.html @@ -0,0 +1,46 @@ +draught::board::enums::Team - Rust + +

Enum draught::board::enums::Team[][src]

#[repr(u8)]pub enum Team {
+    Black,
+    White,
+}

+ Variants

+
Black
White

Trait Implementations

impl Clone for Team[src]

impl Copy for Team[src]

impl Debug for Team[src]

impl Display for Team[src]

impl Eq for Team[src]

impl FromWasmAbi for Team[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Team[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Team[src]

impl OptionIntoWasmAbi for Team[src]

impl PartialEq<Team> for Team[src]

impl StructuralEq for Team[src]

impl StructuralPartialEq for Team[src]

impl WasmDescribe for Team[src]

Auto Trait Implementations

impl RefUnwindSafe for Team

impl Send for Team

impl Sync for Team

impl Unpin for Team

impl UnwindSafe for Team

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/enums/index.html b/doc/draught/board/enums/index.html new file mode 100644 index 0000000..ac0251f --- /dev/null +++ b/doc/draught/board/enums/index.html @@ -0,0 +1,6 @@ +draught::board::enums - Rust + +

Module draught::board::enums[][src]

Enums

+
Moveable
SquareState
Strength
Team
+ \ No newline at end of file diff --git a/doc/draught/board/enums/sidebar-items.js b/doc/draught/board/enums/sidebar-items.js new file mode 100644 index 0000000..d1eadc0 --- /dev/null +++ b/doc/draught/board/enums/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Moveable",""],["SquareState",""],["Strength",""],["Team",""]]}); \ No newline at end of file diff --git a/doc/draught/board/index.html b/doc/draught/board/index.html new file mode 100644 index 0000000..133b5ac --- /dev/null +++ b/doc/draught/board/index.html @@ -0,0 +1,9 @@ +draught::board - Rust + +

Module draught::board[][src]

Modules

+
enums
iter

Structs

+
Board

Models a single state for a checkers board

+
BrdIdx
Direction
Piece
Square

Constants

+
STD_HEIGHT
STD_WIDTH
+ \ No newline at end of file diff --git a/doc/draught/board/iter/index.html b/doc/draught/board/iter/index.html new file mode 100644 index 0000000..566e8e9 --- /dev/null +++ b/doc/draught/board/iter/index.html @@ -0,0 +1,6 @@ +draught::board::iter - Rust + +

Module draught::board::iter[][src]

Structs

+
RowIndexIterator
RowSquareIterator
+ \ No newline at end of file diff --git a/doc/draught/board/iter/sidebar-items.js b/doc/draught/board/iter/sidebar-items.js new file mode 100644 index 0000000..fb9b2ee --- /dev/null +++ b/doc/draught/board/iter/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["RowIndexIterator",""],["RowSquareIterator",""]]}); \ No newline at end of file diff --git a/doc/draught/board/iter/struct.RowIndexIterator.html b/doc/draught/board/iter/struct.RowIndexIterator.html new file mode 100644 index 0000000..5392ae8 --- /dev/null +++ b/doc/draught/board/iter/struct.RowIndexIterator.html @@ -0,0 +1,142 @@ +draught::board::iter::RowIndexIterator - Rust + +

Struct draught::board::iter::RowIndexIterator[][src]

pub struct RowIndexIterator<'a> {
+    board: &'a Board,
+    row_cursor: usize,
+}

+ Fields

board: &'a Boardrow_cursor: usize

Implementations

impl<'a> RowIndexIterator<'a>[src]

pub fn new(board: &'a Board) -> Self[src]

Trait Implementations

impl<'a> Iterator for RowIndexIterator<'a>[src]

type Item = Vec<usize>

The type of the elements being iterated over.

+

fn next(&mut self) -> Option<Vec<usize>>[src]

Get next item from the iterator

+

Auto Trait Implementations

impl<'a> RefUnwindSafe for RowIndexIterator<'a>

impl<'a> Send for RowIndexIterator<'a>

impl<'a> Sync for RowIndexIterator<'a>

impl<'a> Unpin for RowIndexIterator<'a>

impl<'a> UnwindSafe for RowIndexIterator<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

+

type IntoIter = I

Which kind of iterator are we turning this into?

+

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/iter/struct.RowSquareIterator.html b/doc/draught/board/iter/struct.RowSquareIterator.html new file mode 100644 index 0000000..16db7dd --- /dev/null +++ b/doc/draught/board/iter/struct.RowSquareIterator.html @@ -0,0 +1,142 @@ +draught::board::iter::RowSquareIterator - Rust + +

Struct draught::board::iter::RowSquareIterator[][src]

pub struct RowSquareIterator<'a> {
+    board: &'a Board,
+    index_iter: RowIndexIterator<'a>,
+}

+ Fields

board: &'a Boardindex_iter: RowIndexIterator<'a>

Implementations

impl<'a> RowSquareIterator<'a>[src]

pub fn new(board: &'a Board) -> Self[src]

Trait Implementations

impl<'a> Iterator for RowSquareIterator<'a>[src]

type Item = Vec<Square>

The type of the elements being iterated over.

+

fn next(&mut self) -> Option<Vec<Square>>[src]

Get next item from the iterator

+

Auto Trait Implementations

impl<'a> RefUnwindSafe for RowSquareIterator<'a>

impl<'a> Send for RowSquareIterator<'a>

impl<'a> Sync for RowSquareIterator<'a>

impl<'a> Unpin for RowSquareIterator<'a>

impl<'a> UnwindSafe for RowSquareIterator<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

+

type IntoIter = I

Which kind of iterator are we turning this into?

+

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/sidebar-items.js b/doc/draught/board/sidebar-items.js new file mode 100644 index 0000000..310be41 --- /dev/null +++ b/doc/draught/board/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["STD_HEIGHT",""],["STD_WIDTH",""]],"mod":[["enums",""],["iter",""]],"struct":[["Board","Models a single state for a checkers board"],["BrdIdx",""],["Direction",""],["Piece",""],["Square",""]]}); \ No newline at end of file diff --git a/doc/draught/board/struct.Board.html b/doc/draught/board/struct.Board.html new file mode 100644 index 0000000..b2b4908 --- /dev/null +++ b/doc/draught/board/struct.Board.html @@ -0,0 +1,54 @@ +draught::board::Board - Rust + +

Struct draught::board::Board[][src]

pub struct Board {
+    cells: Vec<Square>,
+    width: usize,
+    height: usize,
+    current_turn: Team,
+}

Models a single state for a checkers board

+

+ Fields

cells: Vec<Square>width: usizeheight: usizecurrent_turn: Team

Implementations

impl Board[src]

pub fn cell_mut(&mut self, idx: usize) -> &mut Square[src]

pub fn diagonal_indices(&self, idx: BrdIdx) -> Option<Vec<usize>>[src]

pub fn filter_indices(
    &self,
    idx: BrdIdx,
    player: Team,
    indices: Vec<usize>
) -> Vec<usize>
[src]

pub fn player_diagonal_indices(
    &self,
    idx: BrdIdx,
    player: Team
) -> Option<Vec<usize>>
[src]

pub fn jumpable_indices(&self, idx: BrdIdx) -> Option<Vec<usize>>[src]

pub fn player_jumpable_indices(
    &self,
    idx: BrdIdx,
    player: Team
) -> Option<Vec<usize>>
[src]

impl Board[src]

pub fn cell(&self, idx: usize) -> Square[src]

pub fn grid_cell(&self, idx: BrdIdx) -> Square[src]

pub fn cell_index(&self, row: usize, col: usize) -> usize[src]

pub fn cell_idx(&self, idx: BrdIdx) -> usize[src]

pub fn board_index(&self, idx: usize) -> BrdIdx[src]

pub fn new(width: usize, height: usize) -> Board[src]

pub fn init_game(board: Board) -> Board[src]

pub fn current_turn(&self) -> Team[src]

pub fn cells(&self) -> *const Square[src]

pub fn num_cells(&self) -> usize[src]

pub fn cell_state(&self, idx: usize) -> SquareState[src]

Trait Implementations

impl Clone for Board[src]

impl Display for Board[src]

impl From<Board> for JsValue[src]

impl FromWasmAbi for Board[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Board[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Board[src]

impl OptionIntoWasmAbi for Board[src]

impl RefFromWasmAbi for Board[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

+

type Anchor = Ref<'static, Board>

The type that holds the reference to Self for the duration of the +invocation of the function that has an &Self parameter. This is +required to ensure that the lifetimes don’t persist beyond one function +call, and so that they remain anonymous. Read more

+

impl RefMutFromWasmAbi for Board[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

+

type Anchor = RefMut<'static, Board>

Same as RefFromWasmAbi::Anchor

+

impl WasmDescribe for Board[src]

Auto Trait Implementations

impl RefUnwindSafe for Board

impl Send for Board

impl Sync for Board

impl Unpin for Board

impl UnwindSafe for Board

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/struct.BrdIdx.html b/doc/draught/board/struct.BrdIdx.html new file mode 100644 index 0000000..bab44b1 --- /dev/null +++ b/doc/draught/board/struct.BrdIdx.html @@ -0,0 +1,53 @@ +draught::board::BrdIdx - Rust + +

Struct draught::board::BrdIdx[][src]

pub struct BrdIdx {
+    row: usize,
+    col: usize,
+}

+ Fields

row: usizecol: usize

Implementations

impl BrdIdx[src]

pub fn from(row: usize, col: usize) -> BrdIdx[src]

Trait Implementations

impl Clone for BrdIdx[src]

impl Copy for BrdIdx[src]

impl Debug for BrdIdx[src]

impl Eq for BrdIdx[src]

impl From<BrdIdx> for JsValue[src]

impl FromWasmAbi for BrdIdx[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for BrdIdx[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for BrdIdx[src]

impl OptionIntoWasmAbi for BrdIdx[src]

impl PartialEq<BrdIdx> for BrdIdx[src]

impl RefFromWasmAbi for BrdIdx[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

+

type Anchor = Ref<'static, BrdIdx>

The type that holds the reference to Self for the duration of the +invocation of the function that has an &Self parameter. This is +required to ensure that the lifetimes don’t persist beyond one function +call, and so that they remain anonymous. Read more

+

impl RefMutFromWasmAbi for BrdIdx[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

+

type Anchor = RefMut<'static, BrdIdx>

Same as RefFromWasmAbi::Anchor

+

impl StructuralEq for BrdIdx[src]

impl StructuralPartialEq for BrdIdx[src]

impl WasmDescribe for BrdIdx[src]

Auto Trait Implementations

impl RefUnwindSafe for BrdIdx

impl Send for BrdIdx

impl Sync for BrdIdx

impl Unpin for BrdIdx

impl UnwindSafe for BrdIdx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/struct.Direction.html b/doc/draught/board/struct.Direction.html new file mode 100644 index 0000000..674aa6a --- /dev/null +++ b/doc/draught/board/struct.Direction.html @@ -0,0 +1,30 @@ +draught::board::Direction - Rust + +

Struct draught::board::Direction[][src]

pub struct Direction<T: Clone + Copy> {
+    nw: Option<T>,
+    ne: Option<T>,
+    se: Option<T>,
+    sw: Option<T>,
+}

+ Fields

nw: Option<T>ne: Option<T>se: Option<T>sw: Option<T>

Implementations

impl<T: Clone + Copy> Direction<T>[src]

pub fn empty() -> Direction<T>[src]

Trait Implementations

impl<T: Clone + Copy> Clone for Direction<T>[src]

impl<T: Copy + Clone> Copy for Direction<T>[src]

impl<T: Debug + Clone + Copy> Debug for Direction<T>[src]

impl<T: Eq + Clone + Copy> Eq for Direction<T>[src]

impl<T: PartialEq + Clone + Copy> PartialEq<Direction<T>> for Direction<T>[src]

impl<T: Clone + Copy> StructuralEq for Direction<T>[src]

impl<T: Clone + Copy> StructuralPartialEq for Direction<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Direction<T> where
    T: RefUnwindSafe

impl<T> Send for Direction<T> where
    T: Send

impl<T> Sync for Direction<T> where
    T: Sync

impl<T> Unpin for Direction<T> where
    T: Unpin

impl<T> UnwindSafe for Direction<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/struct.Piece.html b/doc/draught/board/struct.Piece.html new file mode 100644 index 0000000..6810874 --- /dev/null +++ b/doc/draught/board/struct.Piece.html @@ -0,0 +1,53 @@ +draught::board::Piece - Rust + +

Struct draught::board::Piece[][src]

pub struct Piece {
+    team: Team,
+    strength: Strength,
+}

+ Fields

team: Teamstrength: Strength

Implementations

impl Piece[src]

pub fn new(team: Team, strength: Strength) -> Piece[src]

Trait Implementations

impl Clone for Piece[src]

impl Copy for Piece[src]

impl Debug for Piece[src]

impl Eq for Piece[src]

impl From<Piece> for JsValue[src]

impl FromWasmAbi for Piece[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Piece[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Piece[src]

impl OptionIntoWasmAbi for Piece[src]

impl PartialEq<Piece> for Piece[src]

impl RefFromWasmAbi for Piece[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

+

type Anchor = Ref<'static, Piece>

The type that holds the reference to Self for the duration of the +invocation of the function that has an &Self parameter. This is +required to ensure that the lifetimes don’t persist beyond one function +call, and so that they remain anonymous. Read more

+

impl RefMutFromWasmAbi for Piece[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

+

type Anchor = RefMut<'static, Piece>

Same as RefFromWasmAbi::Anchor

+

impl StructuralEq for Piece[src]

impl StructuralPartialEq for Piece[src]

impl WasmDescribe for Piece[src]

Auto Trait Implementations

impl RefUnwindSafe for Piece

impl Send for Piece

impl Sync for Piece

impl Unpin for Piece

impl UnwindSafe for Piece

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/board/struct.Square.html b/doc/draught/board/struct.Square.html new file mode 100644 index 0000000..a8acd2c --- /dev/null +++ b/doc/draught/board/struct.Square.html @@ -0,0 +1,53 @@ +draught::board::Square - Rust + +

Struct draught::board::Square[][src]

pub struct Square {
+    occupant: Option<Piece>,
+    state: SquareState,
+}

+ Fields

occupant: Option<Piece>state: SquareState

Implementations

impl Square[src]

pub fn new(state: SquareState, occupant: Option<Piece>) -> Square[src]

Trait Implementations

impl Clone for Square[src]

impl Copy for Square[src]

impl Debug for Square[src]

impl Eq for Square[src]

impl From<Square> for JsValue[src]

impl FromWasmAbi for Square[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Square[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Square[src]

impl OptionIntoWasmAbi for Square[src]

impl PartialEq<Square> for Square[src]

impl RefFromWasmAbi for Square[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

+

type Anchor = Ref<'static, Square>

The type that holds the reference to Self for the duration of the +invocation of the function that has an &Self parameter. This is +required to ensure that the lifetimes don’t persist beyond one function +call, and so that they remain anonymous. Read more

+

impl RefMutFromWasmAbi for Square[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

+

type Anchor = RefMut<'static, Square>

Same as RefFromWasmAbi::Anchor

+

impl StructuralEq for Square[src]

impl StructuralPartialEq for Square[src]

impl WasmDescribe for Square[src]

Auto Trait Implementations

impl RefUnwindSafe for Square

impl Send for Square

impl Sync for Square

impl Unpin for Square

impl UnwindSafe for Square

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/fn.__wasm_bindgen_generated_init_game.html b/doc/draught/fn.__wasm_bindgen_generated_init_game.html new file mode 100644 index 0000000..92b31e8 --- /dev/null +++ b/doc/draught/fn.__wasm_bindgen_generated_init_game.html @@ -0,0 +1,5 @@ +draught::__wasm_bindgen_generated_init_game - Rust + +

Function draught::__wasm_bindgen_generated_init_game[][src]

pub extern "C" fn __wasm_bindgen_generated_init_game(
) -> <() as ReturnWasmAbi>::Abi
+ \ No newline at end of file diff --git a/doc/draught/fn.init_game.html b/doc/draught/fn.init_game.html new file mode 100644 index 0000000..e4f08b2 --- /dev/null +++ b/doc/draught/fn.init_game.html @@ -0,0 +1,5 @@ +draught::init_game - Rust + +

Function draught::init_game[][src]

pub fn init_game()
+ \ No newline at end of file diff --git a/doc/draught/game/index.html b/doc/draught/game/index.html new file mode 100644 index 0000000..6f5d7e2 --- /dev/null +++ b/doc/draught/game/index.html @@ -0,0 +1,6 @@ +draught::game - Rust + +

Module draught::game[][src]

Structs

+
Game
+ \ No newline at end of file diff --git a/doc/draught/game/sidebar-items.js b/doc/draught/game/sidebar-items.js new file mode 100644 index 0000000..14daea1 --- /dev/null +++ b/doc/draught/game/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Game",""]]}); \ No newline at end of file diff --git a/doc/draught/game/struct.Game.html b/doc/draught/game/struct.Game.html new file mode 100644 index 0000000..a873865 --- /dev/null +++ b/doc/draught/game/struct.Game.html @@ -0,0 +1,44 @@ +draught::game::Game - Rust + +

Struct draught::game::Game[][src]

pub struct Game {
+    current: Board,
+    previous_boards: Vec<Board>,
+    tree: Arena<Board>,
+}

+ Fields

current: Boardprevious_boards: Vec<Board>tree: Arena<Board>

Trait Implementations

impl From<Game> for JsValue[src]

impl FromWasmAbi for Game[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the +ABI boundary. Read more

+

impl IntoWasmAbi for Game[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI +boundary. Read more

+

impl OptionFromWasmAbi for Game[src]

impl OptionIntoWasmAbi for Game[src]

impl RefFromWasmAbi for Game[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

+

type Anchor = Ref<'static, Game>

The type that holds the reference to Self for the duration of the +invocation of the function that has an &Self parameter. This is +required to ensure that the lifetimes don’t persist beyond one function +call, and so that they remain anonymous. Read more

+

impl RefMutFromWasmAbi for Game[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

+

type Anchor = RefMut<'static, Game>

Same as RefFromWasmAbi::Anchor

+

impl WasmDescribe for Game[src]

Auto Trait Implementations

impl RefUnwindSafe for Game

impl Send for Game

impl Sync for Game

impl Unpin for Game

impl UnwindSafe for Game

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/doc/draught/index.html b/doc/draught/index.html new file mode 100644 index 0000000..a81b9df --- /dev/null +++ b/doc/draught/index.html @@ -0,0 +1,8 @@ +draught - Rust + +

Crate draught[][src]

Modules

+
board
game
utils

Macros

+
log

Functions

+
__wasm_bindgen_generated_init_game
init_game
+ \ No newline at end of file diff --git a/doc/draught/macro.log!.html b/doc/draught/macro.log!.html new file mode 100644 index 0000000..7ff1ced --- /dev/null +++ b/doc/draught/macro.log!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.log.html...

+ + + \ No newline at end of file diff --git a/doc/draught/macro.log.html b/doc/draught/macro.log.html new file mode 100644 index 0000000..acebd0a --- /dev/null +++ b/doc/draught/macro.log.html @@ -0,0 +1,9 @@ +draught::log - Rust + +

Macro draught::log[][src]

+macro_rules! log {
+    ( $( $t:tt )* ) => { ... };
+}
+
+ \ No newline at end of file diff --git a/doc/draught/sidebar-items.js b/doc/draught/sidebar-items.js new file mode 100644 index 0000000..7c2b1ab --- /dev/null +++ b/doc/draught/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["__wasm_bindgen_generated_init_game",""],["init_game",""]],"macro":[["log",""]],"mod":[["board",""],["game",""],["utils",""]]}); \ No newline at end of file diff --git a/doc/draught/utils/fn.set_panic_hook.html b/doc/draught/utils/fn.set_panic_hook.html new file mode 100644 index 0000000..f5c4c31 --- /dev/null +++ b/doc/draught/utils/fn.set_panic_hook.html @@ -0,0 +1,5 @@ +draught::utils::set_panic_hook - Rust + +

Function draught::utils::set_panic_hook[][src]

pub fn set_panic_hook()
+ \ No newline at end of file diff --git a/doc/draught/utils/index.html b/doc/draught/utils/index.html new file mode 100644 index 0000000..61ab2f1 --- /dev/null +++ b/doc/draught/utils/index.html @@ -0,0 +1,6 @@ +draught::utils - Rust + +

Module draught::utils[][src]

Functions

+
set_panic_hook
+ \ No newline at end of file diff --git a/doc/draught/utils/sidebar-items.js b/doc/draught/utils/sidebar-items.js new file mode 100644 index 0000000..8b40b8f --- /dev/null +++ b/doc/draught/utils/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["set_panic_hook",""]]}); \ No newline at end of file diff --git a/doc/favicon-16x16.png b/doc/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/doc/favicon-16x16.png differ diff --git a/doc/favicon-32x32.png b/doc/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/doc/favicon-32x32.png differ diff --git a/doc/favicon.svg b/doc/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/doc/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/doc/implementors/core/clone/trait.Clone.js b/doc/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..0499c7a --- /dev/null +++ b/doc/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Clone for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Clone for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Clone for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Clone for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Clone for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> Clone for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Clone for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Clone for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Clone for Board","synthetic":false,"types":["draught::board::Board"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/cmp/trait.Eq.js b/doc/implementors/core/cmp/trait.Eq.js new file mode 100644 index 0000000..e071c41 --- /dev/null +++ b/doc/implementors/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Eq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Eq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Eq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Eq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Eq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Eq + Clone + Copy> Eq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Eq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Eq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/cmp/trait.PartialEq.js b/doc/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..8605401 --- /dev/null +++ b/doc/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl PartialEq<Team> for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl PartialEq<Strength> for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl PartialEq<SquareState> for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl PartialEq<Moveable> for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl PartialEq<Piece> for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: PartialEq + Clone + Copy> PartialEq<Direction<T>> for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl PartialEq<Square> for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl PartialEq<BrdIdx> for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/convert/trait.From.js b/doc/implementors/core/convert/trait.From.js new file mode 100644 index 0000000..e2c61f7 --- /dev/null +++ b/doc/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl From<Piece> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Square> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<BrdIdx> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Board> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Game> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/fmt/trait.Debug.js b/doc/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..9601e5b --- /dev/null +++ b/doc/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Debug for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Debug for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Debug for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Debug for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Debug for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Debug + Clone + Copy> Debug for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Debug for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Debug for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/fmt/trait.Display.js b/doc/implementors/core/fmt/trait.Display.js new file mode 100644 index 0000000..6a31ee2 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Display for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Display for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Display for Board","synthetic":false,"types":["draught::board::Board"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/iter/traits/iterator/trait.Iterator.js b/doc/implementors/core/iter/traits/iterator/trait.Iterator.js new file mode 100644 index 0000000..3b1b783 --- /dev/null +++ b/doc/implementors/core/iter/traits/iterator/trait.Iterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl<'a> Iterator for RowIndexIterator<'a>","synthetic":false,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Iterator for RowSquareIterator<'a>","synthetic":false,"types":["draught::board::iter::RowSquareIterator"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Copy.js b/doc/implementors/core/marker/trait.Copy.js new file mode 100644 index 0000000..e77945b --- /dev/null +++ b/doc/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Copy for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Copy for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Copy for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Copy for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Copy for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Copy + Clone> Copy for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Copy for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Copy for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Freeze.js b/doc/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..e85f6aa --- /dev/null +++ b/doc/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Freeze for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Freeze for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Freeze for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Freeze for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Freeze for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Freeze for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl Freeze for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Freeze for Direction<T> where
    T: Freeze
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Freeze for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Freeze for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Freeze for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Freeze for Game","synthetic":true,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Send.js b/doc/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..31920a4 --- /dev/null +++ b/doc/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Send for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Send for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Send for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Send for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Send for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Send for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl Send for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Send for Direction<T> where
    T: Send
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Send for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Send for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Send for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Send for Game","synthetic":true,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.StructuralEq.js b/doc/implementors/core/marker/trait.StructuralEq.js new file mode 100644 index 0000000..a4f97c7 --- /dev/null +++ b/doc/implementors/core/marker/trait.StructuralEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl StructuralEq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl StructuralEq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl StructuralEq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl StructuralEq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl StructuralEq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> StructuralEq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl StructuralEq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl StructuralEq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.StructuralPartialEq.js b/doc/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..cfbb677 --- /dev/null +++ b/doc/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl StructuralPartialEq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl StructuralPartialEq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl StructuralPartialEq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl StructuralPartialEq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl StructuralPartialEq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> StructuralPartialEq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl StructuralPartialEq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl StructuralPartialEq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Sync.js b/doc/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..7d72a11 --- /dev/null +++ b/doc/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Sync for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Sync for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Sync for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Sync for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Sync for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Sync for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl Sync for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Sync for Direction<T> where
    T: Sync
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Sync for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Sync for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Sync for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Sync for Game","synthetic":true,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Unpin.js b/doc/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..c79e161 --- /dev/null +++ b/doc/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl Unpin for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Unpin for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Unpin for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Unpin for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Unpin for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Unpin for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl Unpin for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Unpin for Direction<T> where
    T: Unpin
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Unpin for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Unpin for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Unpin for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Unpin for Game","synthetic":true,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/std/panic/trait.RefUnwindSafe.js b/doc/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..9c712e7 --- /dev/null +++ b/doc/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl RefUnwindSafe for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl RefUnwindSafe for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl RefUnwindSafe for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl RefUnwindSafe for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> RefUnwindSafe for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> RefUnwindSafe for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl RefUnwindSafe for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> RefUnwindSafe for Direction<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl RefUnwindSafe for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl RefUnwindSafe for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl RefUnwindSafe for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl RefUnwindSafe for Game","synthetic":true,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/std/panic/trait.UnwindSafe.js b/doc/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..fb587a2 --- /dev/null +++ b/doc/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl UnwindSafe for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl UnwindSafe for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl UnwindSafe for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl UnwindSafe for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> UnwindSafe for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> UnwindSafe for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl UnwindSafe for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> UnwindSafe for Direction<T> where
    T: UnwindSafe
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl UnwindSafe for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl UnwindSafe for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl UnwindSafe for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl UnwindSafe for Game","synthetic":true,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/convert/traits/trait.FromWasmAbi.js b/doc/implementors/wasm_bindgen/convert/traits/trait.FromWasmAbi.js new file mode 100644 index 0000000..4c5a73b --- /dev/null +++ b/doc/implementors/wasm_bindgen/convert/traits/trait.FromWasmAbi.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl FromWasmAbi for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl FromWasmAbi for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl FromWasmAbi for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl FromWasmAbi for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl FromWasmAbi for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl FromWasmAbi for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl FromWasmAbi for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl FromWasmAbi for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl FromWasmAbi for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/convert/traits/trait.IntoWasmAbi.js b/doc/implementors/wasm_bindgen/convert/traits/trait.IntoWasmAbi.js new file mode 100644 index 0000000..a7dd55b --- /dev/null +++ b/doc/implementors/wasm_bindgen/convert/traits/trait.IntoWasmAbi.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl IntoWasmAbi for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl IntoWasmAbi for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl IntoWasmAbi for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl IntoWasmAbi for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl IntoWasmAbi for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl IntoWasmAbi for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl IntoWasmAbi for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl IntoWasmAbi for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl IntoWasmAbi for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.js b/doc/implementors/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.js new file mode 100644 index 0000000..3b75e37 --- /dev/null +++ b/doc/implementors/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl OptionFromWasmAbi for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl OptionFromWasmAbi for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl OptionFromWasmAbi for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl OptionFromWasmAbi for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl OptionFromWasmAbi for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl OptionFromWasmAbi for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl OptionFromWasmAbi for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl OptionFromWasmAbi for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl OptionFromWasmAbi for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.js b/doc/implementors/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.js new file mode 100644 index 0000000..d3a0d97 --- /dev/null +++ b/doc/implementors/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl OptionIntoWasmAbi for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl OptionIntoWasmAbi for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl OptionIntoWasmAbi for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl OptionIntoWasmAbi for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl OptionIntoWasmAbi for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl OptionIntoWasmAbi for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl OptionIntoWasmAbi for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl OptionIntoWasmAbi for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl OptionIntoWasmAbi for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.js b/doc/implementors/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.js new file mode 100644 index 0000000..ae4c394 --- /dev/null +++ b/doc/implementors/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl RefFromWasmAbi for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl RefFromWasmAbi for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl RefFromWasmAbi for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl RefFromWasmAbi for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl RefFromWasmAbi for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.js b/doc/implementors/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.js new file mode 100644 index 0000000..f1e47f2 --- /dev/null +++ b/doc/implementors/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl RefMutFromWasmAbi for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl RefMutFromWasmAbi for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl RefMutFromWasmAbi for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl RefMutFromWasmAbi for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl RefMutFromWasmAbi for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/wasm_bindgen/describe/trait.WasmDescribe.js b/doc/implementors/wasm_bindgen/describe/trait.WasmDescribe.js new file mode 100644 index 0000000..6b502d7 --- /dev/null +++ b/doc/implementors/wasm_bindgen/describe/trait.WasmDescribe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["draught"] = [{"text":"impl WasmDescribe for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl WasmDescribe for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl WasmDescribe for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl WasmDescribe for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl WasmDescribe for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl WasmDescribe for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl WasmDescribe for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl WasmDescribe for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl WasmDescribe for Game","synthetic":false,"types":["draught::game::Game"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/light.css b/doc/light.css new file mode 100644 index 0000000..050c4f2 --- /dev/null +++ b/doc/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/doc/main.js b/doc/main.js new file mode 100644 index 0000000..9beaa88 --- /dev/null +++ b/doc/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(build){if(build!==false){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display===true){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);document.addEventListener("mousemove",function(){mouseMovedAfterSearch=true});var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){var helpElem=getHelpElement(false);if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(helpElem&&hasClass(helpElem,"hidden")===false){var is_inside_help_popup=ev.target!==helpElem&&helpElem.contains(ev.target);if(is_inside_help_popup===false){addClass(helpElem,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectNameFromId(id){if(typeof id==="number"){return searchIndex[id].name}return id}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=object[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var normalizedName=crate.indexOf("_")===-1?crate:crate.replace(/_/g,"");var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:normalizedName,};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:normalizedName,};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!aliases.hasOwnProperty(alias_name)){continue}if(!ALIASES[crate].hasOwnProperty(alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}window.onpageshow=function(){var qSearch=getQueryStringParams().search;if(search_input.value===""&&qSearch){search_input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(getQueryStringParams().search){search()}};function addSidebarCrates(crates){if(window.rootPath==="../"||window.rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide")}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide")}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide")}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=Array.prototype.slice.call(e.getElementsByClassName("hidden"));var needToggle=hiddenElems.some(function(hiddenElem){return hasClass(hiddenElem,"content")===false&&hasClass(hiddenElem,"docblock")===false});if(needToggle===true){var inner_toggle=newToggle.cloneNode(true);inner_toggle.onclick=toggleClicked;e.insertBefore(inner_toggle,e.firstChild);impl_call(e.previousSibling,inner_toggle)}});var currentType=document.getElementsByClassName("type-decl")[0];var className=null;if(currentType){currentType=currentType.getElementsByClassName("rust")[0];if(currentType){currentType.classList.forEach(function(item){if(item!=="main"){className=item;return true}})}}var showItemDeclarations=getSettingValue("auto-hide-"+className);if(showItemDeclarations===null){if(className==="enum"||className==="macro"){showItemDeclarations="false"}else if(className==="struct"||className==="union"||className==="trait"){showItemDeclarations="true"}else{showItemDeclarations=getSettingValue("auto-hide-declarations")}}showItemDeclarations=showItemDeclarations==="false";function buildToggleWrapper(e){if(hasClass(e,"autohide")){var wrap=e.previousElementSibling;if(wrap&&hasClass(wrap,"toggle-wrapper")){var inner_toggle=wrap.childNodes[0];var extra=e.childNodes[0].tagName==="H3";e.style.display="none";addClass(wrap,"collapsed");onEachLazy(inner_toggle.getElementsByClassName("inner"),function(e){e.innerHTML=labelForToggleButton(true)});onEachLazy(inner_toggle.getElementsByClassName("toggle-label"),function(e){e.style.display="inline-block";if(extra===true){e.innerHTML=" Show "+e.childNodes[0].innerHTML}})}}if(e.parentNode.id==="main"){var otherMessage="";var fontSize;var extraClass;if(hasClass(e,"type-decl")){fontSize="20px";otherMessage=" Show declaration";if(showItemDeclarations===false){extraClass="collapsed"}}else if(hasClass(e,"sub-variant")){otherMessage=" Show fields"}else if(hasClass(e,"non-exhaustive")){otherMessage=" This ";if(hasClass(e,"non-exhaustive-struct")){otherMessage+="struct"}else if(hasClass(e,"non-exhaustive-enum")){otherMessage+="enum"}else if(hasClass(e,"non-exhaustive-variant")){otherMessage+="enum variant"}else if(hasClass(e,"non-exhaustive-type")){otherMessage+="type"}otherMessage+=" is marked as non-exhaustive"}else if(hasClass(e.childNodes[0],"impl-items")){extraClass="marg-left"}e.parentNode.insertBefore(createToggle(toggle,otherMessage,fontSize,extraClass,hasClass(e,"type-decl")===false||showItemDeclarations===true),e);if(hasClass(e,"type-decl")===true&&showItemDeclarations===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}if(hasClass(e,"non-exhaustive")===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}}}onEachLazy(document.getElementsByClassName("docblock"),buildToggleWrapper);onEachLazy(document.getElementsByClassName("sub-variant"),buildToggleWrapper);autoCollapse(getSettingValue("collapse")==="true");var pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());function createToggleWrapper(tog){var span=document.createElement("span");span.className="toggle-label";span.style.display="none";span.innerHTML=" Expand attributes";tog.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper toggle-attributes";wrapper.appendChild(tog);return wrapper}(function(){var itemAttributesFunc=function(){};if(getSettingValue("auto-hide-attributes")!=="false"){itemAttributesFunc=function(x){collapseDocs(x.previousSibling.childNodes[0],"toggle")}}var attributesToggle=createToggleWrapper(createSimpleToggle(false));onEachLazy(main.getElementsByClassName("attributes"),function(i_e){var attr_tog=attributesToggle.cloneNode(true);if(hasClass(i_e,"top-attr")===true){addClass(attr_tog,"top-attr")}i_e.parentNode.insertBefore(attr_tog,i_e);itemAttributesFunc(i_e)})}());(function(){var lineNumbersFunc=function(){};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function addSearchOptions(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"
"+x[0].split(" ").map(function(y,index){return(index&1)===0?""+y+"":" "+y+" "}).join("")+"
"+x[1]+"
"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(function(x){return"

"+x+"

"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}function setupSearchLoader(){var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS)}}addSearchOptions(window.ALL_CRATES);addSidebarCrates(window.ALL_CRATES);search_input.addEventListener("focus",function(){search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=search_input.origPlaceholder});search_input.removeAttribute('disabled');var crateSearchDropDown=document.getElementById("crate-search");if(crateSearchDropDown){crateSearchDropDown.addEventListener("focus",loadSearch)}var params=getQueryStringParams();if(params.search!==undefined){loadSearch()}}onHashChange(null);window.onhashchange=onHashChange;setupSearchLoader()}()) \ No newline at end of file diff --git a/doc/normalize.css b/doc/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/doc/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/doc/noscript.css b/doc/noscript.css new file mode 100644 index 0000000..b833ff8 --- /dev/null +++ b/doc/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;}#main .impl-items h4.hidden{display:flex !important;}#main .attributes{margin-left:0 !important;} \ No newline at end of file diff --git a/doc/rust-logo.png b/doc/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/doc/rust-logo.png differ diff --git a/doc/rustdoc.css b/doc/rustdoc.css new file mode 100644 index 0000000..e5412cb --- /dev/null +++ b/doc/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');font-display:swap;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle,#main>ul.docblock>li>a{font-family:"Fira Sans",Arial,sans-serif;}.content ul.crate a.crate{font-size:16px/1.6;font-family:"Fira Sans",Arial,sans-serif;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;padding-right:1ex;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;margin-bottom:0;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/doc/search-index.js b/doc/search-index.js new file mode 100644 index 0000000..d8adcb5 --- /dev/null +++ b/doc/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"draught":{"doc":"","t":[0,0,4,13,13,4,13,13,4,13,13,13,4,13,13,13,0,3,12,12,11,3,12,12,11,17,17,3,12,12,11,3,12,12,12,12,11,3,12,12,11,3,12,12,11,3,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,5,0,3,12,12,12,5,5,14,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["board","enums","Team","Black","White","Strength","Man","King","SquareState","Empty","Occupied","Unplayable","Moveable","Allowed","Occupied","OutOfBounds","iter","RowIndexIterator","board","row_cursor","new","RowSquareIterator","board","index_iter","new","STD_WIDTH","STD_HEIGHT","Piece","team","strength","new","Direction","nw","ne","se","sw","empty","Square","occupant","state","new","BrdIdx","row","col","from","Board","cells","width","height","current_turn","cell_mut","diagonal_indices","filter_indices","player_diagonal_indices","jumpable_indices","player_jumpable_indices","cell","grid_cell","cell_index","cell_idx","board_index","new","init_game","current_turn","cells","num_cells","cell_state","utils","set_panic_hook","game","Game","current","previous_boards","tree","init_game","__wasm_bindgen_generated_init_game","log","from","into","to_owned","clone_into","to_string","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","to_owned","clone_into","to_string","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","into_iter","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","into_iter","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","to_owned","clone_into","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","to_owned","clone_into","to_string","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","from","into","borrow","borrow_mut","try_from","try_into","type_id","return_abi","vzip","next","next","clone","clone","clone","clone","clone","clone","clone","clone","clone","eq","eq","eq","eq","eq","ne","eq","ne","eq","ne","eq","ne","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","ref_from_abi","ref_from_abi","ref_from_abi","ref_from_abi","ref_from_abi","from_abi","from_abi","from_abi","from_abi","from_abi","from_abi","from_abi","from_abi","from_abi","into_abi","into_abi","into_abi","into_abi","into_abi","into_abi","into_abi","into_abi","into_abi","describe","describe","describe","describe","describe","describe","describe","describe","describe","is_none","is_none","is_none","is_none","is_none","is_none","is_none","is_none","is_none","none","none","none","none","none","none","none","none","none","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi"],"q":["draught","draught::board","draught::board::enums","","","","","","","","","","","","","","draught::board","draught::board::iter","","","","","","","","draught::board","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught","draught::utils","draught","draught::game","","","","draught","","","draught::board::enums","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::board::iter","","","","","","","","","","","","","","","","","","draught::board","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::game","","","","","","","","","draught::board::iter","","draught::board::enums","","","","draught::board","","","","","draught::board::enums","","","","draught::board","","","","","","","","draught::board::enums","","","","draught::board","","","","draught::board::enums","","draught::board","","","","","draught::game","draught::board::enums","","","","draught::board","","","","draught::game","draught::board::enums","","","","draught::board","","","","draught::game","draught::board::enums","","","","draught::board","","","","draught::game","draught::board::enums","","","","draught::board","","","","draught::game","draught::board::enums","","","","draught::board","","","","draught::game","draught::board","","","","draught::game"],"d":["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Models a single state for a checkers board","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Get next item from the iterator","Get next item from the iterator","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,1,1,0,2,2,0,3,3,3,0,4,4,4,0,0,5,5,5,0,6,6,6,0,0,0,7,7,7,0,8,8,8,8,8,0,9,9,9,0,10,10,10,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,12,12,12,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,5,6,1,2,3,4,7,8,9,10,11,1,2,3,4,7,7,8,8,9,9,10,10,1,2,3,4,7,8,9,10,1,3,11,7,9,10,11,12,1,2,3,4,7,9,10,11,12,1,2,3,4,7,9,10,11,12,1,2,3,4,7,9,10,11,12,1,2,3,4,7,9,10,11,12,1,2,3,4,7,9,10,11,12,7,9,10,11,12],"f":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["board",3]]],null,null,null,[[["board",3]]],null,null,null,null,null,[[["strength",4],["team",4]],["piece",3]],null,null,null,null,null,[[],["direction",3]],null,null,null,[[["piece",3],["squarestate",4],["option",4]],["square",3]],null,null,null,[[["usize",15]],["brdidx",3]],null,null,null,null,null,[[["usize",15]],["square",3]],[[["brdidx",3]],[["option",4],["vec",3]]],[[["usize",15],["brdidx",3],["team",4],["vec",3]],[["usize",15],["vec",3]]],[[["brdidx",3],["team",4]],[["option",4],["vec",3]]],[[["brdidx",3]],[["option",4],["vec",3]]],[[["brdidx",3],["team",4]],[["option",4],["vec",3]]],[[["usize",15]],["square",3]],[[["brdidx",3]],["square",3]],[[["usize",15]],["usize",15]],[[["brdidx",3]],["usize",15]],[[["usize",15]],["brdidx",3]],[[["usize",15]],["board",3]],[[["board",3]],["board",3]],[[],["team",4]],[[]],[[],["usize",15]],[[["usize",15]],["squarestate",4]],null,[[]],null,null,null,null,null,[[]],[[]],null,[[]],[[]],[[]],[[]],[[],["string",3]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["string",3]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["string",3]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[]],[[]],[[],[["option",4],["vec",3]]],[[],[["vec",3],["option",4]]],[[],["team",4]],[[],["strength",4]],[[],["squarestate",4]],[[],["moveable",4]],[[],["piece",3]],[[],["direction",3]],[[],["square",3]],[[],["brdidx",3]],[[],["board",3]],[[["team",4]],["bool",15]],[[["strength",4]],["bool",15]],[[["squarestate",4]],["bool",15]],[[["moveable",4]],["bool",15]],[[["piece",3]],["bool",15]],[[["piece",3]],["bool",15]],[[["direction",3]],["bool",15]],[[["direction",3]],["bool",15]],[[["square",3]],["bool",15]],[[["square",3]],["bool",15]],[[["brdidx",3]],["bool",15]],[[["brdidx",3]],["bool",15]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[["u32",15]]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[],["u32",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["u32",15]],["bool",15]],[[["u32",15]],["bool",15]],[[["u32",15]],["bool",15]],[[["u32",15]],["bool",15]],[[],["bool",15]],[[],["bool",15]],[[],["bool",15]],[[],["bool",15]],[[],["bool",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]]],"p":[[4,"Team"],[4,"Strength"],[4,"SquareState"],[4,"Moveable"],[3,"RowIndexIterator"],[3,"RowSquareIterator"],[3,"Piece"],[3,"Direction"],[3,"Square"],[3,"BrdIdx"],[3,"Board"],[3,"Game"]]}\ +}'); +initSearch(searchIndex); \ No newline at end of file diff --git a/doc/settings.css b/doc/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/doc/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/doc/settings.html b/doc/settings.html new file mode 100644 index 0000000..678a1f2 --- /dev/null +++ b/doc/settings.html @@ -0,0 +1,7 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
+ \ No newline at end of file diff --git a/doc/settings.js b/doc/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/doc/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/doc/source-files.js b/doc/source-files.js new file mode 100644 index 0000000..f5fdb31 --- /dev/null +++ b/doc/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["draught"] = {"name":"","dirs":[{"name":"board","files":["enums.rs","iter.rs","mod.rs"]}],"files":["game.rs","lib.rs","utils.rs"]}; +createSourceSidebar(); diff --git a/doc/source-script.js b/doc/source-script.js new file mode 100644 index 0000000..67f62a1 --- /dev/null +++ b/doc/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/doc/src/draught/board/enums.rs.html b/doc/src/draught/board/enums.rs.html new file mode 100644 index 0000000..6b53299 --- /dev/null +++ b/doc/src/draught/board/enums.rs.html @@ -0,0 +1,120 @@ +enums.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+
+extern crate wasm_bindgen;
+use wasm_bindgen::prelude::*;
+
+use std::fmt::{Display, Write};
+
+#[wasm_bindgen]
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum Team {
+    Black = 0,
+    White = 1,
+}
+
+impl Display for Team {
+    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+        match self {
+            Team::White => write!(f, "{}", 'W'),
+            Team::Black => write!(f, "{}", 'B'),
+        }
+    }
+}
+
+#[wasm_bindgen]
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum Strength {
+    Man = 0,
+    King = 1
+}
+
+#[wasm_bindgen]
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum SquareState {
+    Empty = 0,
+    Occupied = 1,
+    Unplayable = 2
+}
+
+impl Display for SquareState {
+    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+        match self {
+            SquareState::Empty => write!(f, "{}", 'E'),
+            SquareState::Occupied => write!(f, "{}", 'O'),
+            SquareState::Unplayable => write!(f, "{}", 'U'),
+        }
+    }
+}
+
+#[wasm_bindgen]
+#[repr(u8)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum Moveable {
+    Allowed = 0,
+    Occupied = 1,
+    OutOfBounds = 2,
+}
+
+ \ No newline at end of file diff --git a/doc/src/draught/board/iter.rs.html b/doc/src/draught/board/iter.rs.html new file mode 100644 index 0000000..99149e1 --- /dev/null +++ b/doc/src/draught/board/iter.rs.html @@ -0,0 +1,218 @@ +iter.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+
+use crate::board::{Board, Square};
+
+pub struct RowIndexIterator<'a> {
+    board: &'a Board,
+    row_cursor: usize
+}
+
+impl<'a> RowIndexIterator<'a> {
+    pub fn new(board: &'a Board) -> Self {
+        Self { 
+            board, 
+            row_cursor: 0 
+        }
+    }
+}
+
+impl<'a> Iterator for RowIndexIterator<'a> {
+    type Item = Vec<usize>;
+    
+    /// Get next item from the iterator
+    fn next(&mut self) -> Option<Vec<usize>> {
+        if self.row_cursor >= self.board.height {
+            return None
+        }
+        let mut holder = Vec::with_capacity(self.board.width);
+
+        let start_idx = self.board.cell_index(self.row_cursor, 0);
+        for i in start_idx..start_idx + self.board.width {
+            holder.push(i);
+        }
+
+        self.row_cursor += 1;
+        Some(holder)
+    }
+}
+
+pub struct RowSquareIterator<'a> {
+    board: &'a Board,
+    index_iter: RowIndexIterator<'a>,
+}
+
+impl<'a> RowSquareIterator<'a> {
+    pub fn new(board: &'a Board) -> Self {
+        Self { 
+            board, 
+            index_iter: RowIndexIterator::new(board)
+        }
+    }
+}
+
+impl<'a> Iterator for RowSquareIterator<'a> {
+    type Item = Vec<Square>;
+    
+    /// Get next item from the iterator
+    fn next(&mut self) -> Option<Vec<Square>> {
+
+        match self.index_iter.next() {
+            Some(x) => {
+                let mut holder: Vec<Square> = Vec::with_capacity(self.board.width);
+                for i in x {
+                    holder.push(self.board.cell(i));
+                }
+                Some(holder)
+            },
+            None => None
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::board::enums::SquareState;
+    use wasm_bindgen_test::*;
+
+    wasm_bindgen_test_configure!(run_in_browser);
+
+    #[wasm_bindgen_test]
+    fn index_iterator() {
+        let board = Board::new(2, 2);
+        let iter = RowIndexIterator::new(&board);
+        let collected: Vec<Vec<usize>> = iter.collect();
+        assert_eq!(vec![
+            vec![0, 1],
+            vec![2, 3]
+        ], collected);
+    }
+
+    #[wasm_bindgen_test]
+    fn square_iterator() {
+        let board = Board::new(2, 2);
+        let iter = RowSquareIterator::new(&board);
+        let collected: Vec<Vec<Square>> = iter.collect();
+        assert_eq!(vec![
+            vec![
+                Square::new(SquareState::Unplayable, Option::None), 
+                Square::new(SquareState::Empty, Option::None)
+                ],
+            vec![
+                Square::new(SquareState::Empty, Option::None), 
+                Square::new(SquareState::Unplayable, Option::None)
+                ]
+        ], collected);
+    }
+
+}
+
+ \ No newline at end of file diff --git a/doc/src/draught/board/mod.rs.html b/doc/src/draught/board/mod.rs.html new file mode 100644 index 0000000..4d94cd0 --- /dev/null +++ b/doc/src/draught/board/mod.rs.html @@ -0,0 +1,1094 @@ +mod.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+
+
+pub mod enums;
+use enums::*;
+
+pub mod iter;
+use iter::*;
+
+use std::fmt::{Display, Write};
+use std::option::Option;
+
+extern crate wasm_bindgen;
+use wasm_bindgen::prelude::*;
+
+pub const STD_WIDTH: usize = 8;
+pub const STD_HEIGHT: usize = 8;
+
+#[wasm_bindgen]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub struct Piece {
+    team: Team,
+    strength: Strength
+}
+
+impl Piece {
+    pub fn new(team: Team, strength: Strength) -> Piece {
+        Piece {
+            team, strength
+        }
+    }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub struct Direction<T: Clone + Copy> {
+    nw: Option<T>,
+    ne: Option<T>,
+    se: Option<T>,
+    sw: Option<T>,
+}
+
+impl<T: Clone + Copy> Direction<T> {
+    pub fn empty() -> Direction<T> {
+        Direction {
+            nw: Option::None,
+            ne: Option::None,
+            se: Option::None,
+            sw: Option::None,
+        }
+    }
+}
+
+#[wasm_bindgen]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub struct Square {
+    occupant: Option<Piece>,
+    state: SquareState
+}
+
+impl Square {
+    pub fn new(state: SquareState, occupant: Option<Piece>) -> Square{
+        Square {
+            occupant,
+            state
+        }
+    }
+}
+
+#[wasm_bindgen]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub struct BrdIdx {
+    row: usize,
+    col: usize
+}
+
+#[wasm_bindgen]
+impl BrdIdx {
+    pub fn from(row: usize, col: usize) -> BrdIdx {
+        BrdIdx{
+            row, col
+        }
+    }
+}
+
+///////////////
+//   BOARD
+///////////////
+
+/// Models a single state for a checkers board
+#[wasm_bindgen]
+#[derive(Clone)]
+pub struct Board {
+    cells: Vec<Square>,
+    width: usize,
+    height: usize,
+
+    current_turn: Team
+}
+
+impl Board {
+    pub fn cell_mut(&mut self, idx: usize) -> &mut Square {
+        &mut self.cells[idx]
+    }
+
+    pub fn diagonal_indices(&self, idx: BrdIdx) -> Option<Vec<usize>> {
+        if self.cell_state(self.cell_idx(idx)) == SquareState::Unplayable {
+            return None;
+        }
+
+        let height_idx = self.height - 1;
+        let width_idx = self.width - 1;
+
+        let mut cells = Vec::with_capacity(4);
+        let mut dir = Direction::empty();
+
+        if idx.row > 0 {
+            if idx.col > 0 {
+                cells.push(
+                    self.cell_index(idx.row - 1, idx.col - 1)
+                );
+                dir.nw = Option::Some(self.cell(self.cell_index(idx.row - 1, idx.col - 1)));
+            }
+
+            if idx.col < width_idx {
+                cells.push(
+                    self.cell_index(idx.row - 1, idx.col + 1)
+                );
+                dir.ne = Option::Some(self.cell(self.cell_index(idx.row - 1, idx.col + 1)));
+            }
+        }
+
+        if idx.row < height_idx {
+            if idx.col > 0 {
+                cells.push(
+                    self.cell_index(idx.row + 1, idx.col - 1)
+                );
+                dir.sw = Option::Some(self.cell(self.cell_index(idx.row + 1, idx.col - 1)));
+            }
+
+            if idx.col < width_idx {
+                cells.push(
+                    self.cell_index(idx.row + 1, idx.col + 1)
+                );
+                dir.se = Option::Some(self.cell(self.cell_index(idx.row + 1, idx.col + 1)));
+            }
+        }
+
+        cells.shrink_to_fit();
+        Some(cells)
+        // Some(dir)
+    }
+
+    pub fn filter_indices(&self, idx: BrdIdx, player: Team, indices: Vec<usize>) -> Vec<usize> {
+        indices.into_iter().filter(|i| {
+            match player {
+                Team::Black => self.board_index(*i).row < idx.row,
+                Team::White => self.board_index(*i).row > idx.row,
+            }
+        }).collect()
+    }
+
+    pub fn player_diagonal_indices(&self, idx: BrdIdx, player: Team) -> Option<Vec<usize>> {
+        match self.diagonal_indices(idx) {
+            Some(x) => Some(self.filter_indices(idx, player, x)),
+            None => None
+        }
+    }
+
+    pub fn jumpable_indices(&self, idx: BrdIdx) -> Option<Vec<usize>> {
+        if self.cell_state(self.cell_idx(idx)) == SquareState::Unplayable {
+            return None;
+        }
+
+        let height_idx = self.height - 1;
+        let width_idx = self.width - 1;
+
+        let mut cells = Vec::with_capacity(4);
+
+        if idx.row > 1 {
+            if idx.col > 1 {
+                cells.push(
+                    self.cell_index(idx.row - 2, idx.col - 2)
+                );
+            }
+
+            if idx.col < width_idx - 1 {
+                cells.push(
+                    self.cell_index(idx.row - 2, idx.col + 2)
+                );
+            }
+        }
+
+        if idx.row < height_idx - 1 {
+            if idx.col > 1 {
+                cells.push(
+                    self.cell_index(idx.row + 2, idx.col - 2)
+                );
+            }
+
+            if idx.col < width_idx - 1 {
+                cells.push(
+                    self.cell_index(idx.row + 2, idx.col + 2)
+                );
+            }
+        }
+
+        cells.shrink_to_fit();
+        Some(cells)
+    }
+
+    pub fn player_jumpable_indices(&self, idx: BrdIdx, player: Team) -> Option<Vec<usize>> {
+        match self.jumpable_indices(idx) {
+            Some(x) => Some(self.filter_indices(idx, player, x)),
+            None => None
+        }
+    }
+}
+
+#[wasm_bindgen]
+impl Board {
+    pub fn cell(&self, idx: usize) -> Square {
+        self.cells[idx]
+    }
+
+    pub fn grid_cell(&self, idx: BrdIdx) -> Square {
+        self.cell(self.cell_idx(idx))
+    }
+    
+    pub fn cell_index(&self, row: usize, col: usize) -> usize {
+        (row * self.width) + col
+    }
+
+    pub fn cell_idx(&self, idx: BrdIdx) -> usize {
+        self.cell_index(idx.row, idx.col)
+    }
+
+    pub fn board_index(&self, idx: usize) -> BrdIdx {
+        let row = idx / self.width;
+        let col = idx - (row * self.width);
+        BrdIdx::from(row, col)
+    }
+
+    // pub fn can_move(&self, from: BrdIdx, to: BrdIdx) -> bool {
+    //     let diagonals = self.diagonal_indices(from);
+    // }
+
+    pub fn new(width: usize, height: usize) -> Board {
+        let total_cells = width * height;
+
+        let mut cells: Vec<Square>  = Vec::with_capacity(total_cells);
+        let mut playable = false;
+
+        for i in 0..height {
+            for _ in 0..width {
+                if playable {
+                    cells.push(Square::new(SquareState::Empty, None));
+                }
+                else {
+                    cells.push(Square::new(SquareState::Unplayable, None));
+                }
+                playable = !playable;
+            }
+            playable = i % 2 == 0;
+        }
+
+        Board {
+            cells,
+            width,
+            height,
+
+            current_turn: Team::Black
+        }
+    }
+
+    pub fn init_game(board: Board) -> Board {
+        let mut new_board = board.clone();
+        for (idx, row) in RowSquareIterator::new(&board).enumerate() {
+            for (jdx, square) in row.iter().enumerate() {
+
+                if square.state == SquareState::Empty || square.state == SquareState::Occupied {
+                    if idx < 3 {
+                        let cell_idx = new_board.cell_index(idx, jdx);
+                        new_board.cells[cell_idx] = Square::new(
+                            SquareState::Occupied, 
+                            Some(Piece::new(Team::White, Strength::Man))
+                        );
+                    } else if idx >= board.height - 3 {
+                        let cell_idx = new_board.cell_index(idx, jdx);
+                        new_board.cells[cell_idx] = Square::new(
+                            SquareState::Occupied, 
+                            Some(Piece::new(Team::Black, Strength::Man))
+                        );
+                    } else {
+                        let cell_idx = new_board.cell_index(idx, jdx);
+                        new_board.cells[cell_idx] = Square::new(
+                            SquareState::Empty, 
+                            None
+                        );
+                    }
+                }
+            }
+        }
+
+        new_board
+    }
+
+    pub fn current_turn(&self) -> Team {
+        self.current_turn
+    }
+
+    pub fn cells(&self) -> *const Square {
+        self.cells.as_ptr()
+    }
+
+    pub fn num_cells(&self) -> usize {
+        self.cells.len()
+    }
+
+    pub fn cell_state(&self, idx: usize) -> SquareState {
+        self.cell(idx).state
+    }
+}
+
+impl Display for Board {
+    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result{
+        let mut string = String::new();
+
+        for i in 0..self.height {
+            for j in 0..self.width {
+                let idx = self.cell_index(i, j);
+
+                match self.cell_state(idx) {
+                    SquareState::Empty => { write!(string, "{}", SquareState::Empty); },
+                    SquareState::Occupied => { write!(string, "{}", self.cell(idx).occupant.unwrap().team); },
+                    SquareState::Unplayable => { write!(string, "{}", SquareState::Unplayable); },
+                }
+            }
+            string.push('\n');
+        }
+
+        write!(f, "{}", string)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use wasm_bindgen_test::*;
+    use crate::log;
+
+    wasm_bindgen_test_configure!(run_in_browser);
+
+    #[wasm_bindgen_test]
+    fn create() {
+        let board = Board::new(STD_WIDTH, STD_HEIGHT);
+        assert!(true);
+    }
+
+    #[wasm_bindgen_test]
+    fn std_num_cells() {
+        let board = Board::new(8, 8);
+        assert_eq!(64, board.num_cells());
+    }
+
+    //////////////
+    // INDEXING
+    //////////////
+
+    #[wasm_bindgen_test]
+    fn cell_index_top_left() {
+        let board = Board::new(8, 8);
+        assert_eq!(0, board.cell_index(0, 0));
+    }
+
+    #[wasm_bindgen_test]
+    fn cell_index_central() {
+        let board = Board::new(8, 8);
+        assert_eq!(9, board.cell_index(1, 1));
+    }
+
+    #[wasm_bindgen_test]
+    fn cell_index_central_2() {
+        let board = Board::new(8, 8);
+        assert_eq!(17, board.cell_index(2, 1));
+    }
+
+    #[wasm_bindgen_test]
+    fn board_index() {
+        let board = Board::new(8, 8);
+
+        // first row
+        assert_eq!(BrdIdx::from(0, 5), board.board_index(5));
+        // second row
+        assert_eq!(BrdIdx::from(1, 6), board.board_index(14));
+        // third row
+        assert_eq!(BrdIdx::from(2, 4), board.board_index(20));
+    }
+
+    ///////////////////
+    // SQUARE STATE
+    ///////////////////
+
+    #[wasm_bindgen_test]
+    fn first_square_unplayable() {
+        let board = Board::new(8, 8);
+        assert_eq!(SquareState::Unplayable, board.cell_state(board.cell_index(0, 0)));
+    }
+
+    #[wasm_bindgen_test]
+    fn first_square_row_5_unplayable() {
+        let board = Board::new(8, 8);
+        assert_eq!(SquareState::Empty, board.cell_state(board.cell_index(5, 0)));
+    }
+
+    //////////////////////
+    // DIAGNOAL INDICES
+    //////////////////////
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_unplayable() {
+        let board = Board::new(8, 8);
+        assert_eq!(None, board.diagonal_indices(BrdIdx::from(7, 7)));
+        assert_eq!(None, board.diagonal_indices(BrdIdx::from(0, 0)));
+        assert_eq!(None, board.diagonal_indices(BrdIdx::from(1, 1)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_central() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![1, 3, 17, 19]), board.diagonal_indices(BrdIdx::from(1, 2)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_top_row() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![8, 10]), board.diagonal_indices(BrdIdx::from(0, 1)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_left_column() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![1, 17]), board.diagonal_indices(BrdIdx::from(1, 0)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_bottom_row() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![49, 51]), board.diagonal_indices(BrdIdx::from(7, 2)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_right_column() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![14, 30]), board.diagonal_indices(BrdIdx::from(2, 7)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_top_right() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![14]), board.diagonal_indices(BrdIdx::from(0, 7)));
+    }
+
+    #[wasm_bindgen_test]
+    fn moveable_indices_bottom_left() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![49]), board.diagonal_indices(BrdIdx::from(7, 0)));
+    }
+
+    //////////////////////
+    // JUMPABLE INDICES
+    //////////////////////
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_unplayable() {
+        let board = Board::new(8, 8);
+        assert_eq!(None, board.jumpable_indices(BrdIdx::from(7, 7)));
+        assert_eq!(None, board.jumpable_indices(BrdIdx::from(0, 0)));
+        assert_eq!(None, board.jumpable_indices(BrdIdx::from(1, 1)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![24, 28]), board.jumpable_indices(BrdIdx::from(1, 2)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_central() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![10, 14, 42, 46]), board.jumpable_indices(BrdIdx::from(3, 4)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_top_row() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![19]), board.jumpable_indices(BrdIdx::from(0, 1)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_left_column() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![26]), board.jumpable_indices(BrdIdx::from(1, 0)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_bottom_row() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![40, 44]), board.jumpable_indices(BrdIdx::from(7, 2)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_right_column() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![5, 37]), board.jumpable_indices(BrdIdx::from(2, 7)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_top_right() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![21]), board.jumpable_indices(BrdIdx::from(0, 7)));
+    }
+
+    #[wasm_bindgen_test]
+    fn jumpable_indices_bottom_left() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![42]), board.jumpable_indices(BrdIdx::from(7, 0)));
+    }
+
+    #[wasm_bindgen_test]
+    fn init_game() {
+        let board = Board::init_game(Board::new(8, 8));
+        log!("{}", board);
+    }
+
+    #[wasm_bindgen_test]
+    fn black_diagonal_indices() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![1, 3]), board.player_diagonal_indices(BrdIdx::from(1, 2), Team::Black));
+    }
+
+    #[wasm_bindgen_test]
+    fn white_diagonal_indices() {
+        let board = Board::new(8, 8);
+        assert_eq!(Some(vec![17, 19]), board.player_diagonal_indices(BrdIdx::from(1, 2), Team::White));
+    }
+}
+
+ \ No newline at end of file diff --git a/doc/src/draught/game.rs.html b/doc/src/draught/game.rs.html new file mode 100644 index 0000000..f7c12e0 --- /dev/null +++ b/doc/src/draught/game.rs.html @@ -0,0 +1,30 @@ +game.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+
+use crate::board::Board;
+use indextree::Arena;
+
+extern crate wasm_bindgen;
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+pub struct Game {
+    current: Board,
+    previous_boards: Vec<Board>,
+    tree: Arena<Board>
+}
+
+ \ No newline at end of file diff --git a/doc/src/draught/lib.rs.html b/doc/src/draught/lib.rs.html new file mode 100644 index 0000000..df33c6e --- /dev/null +++ b/doc/src/draught/lib.rs.html @@ -0,0 +1,62 @@ +lib.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
+pub mod board;
+pub mod utils;
+pub mod game;
+
+extern crate wasm_bindgen;
+use wasm_bindgen::prelude::*;
+
+// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
+// allocator.
+// #[cfg(feature = "wee_alloc")]
+// #[global_allocator]
+// static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
+
+#[macro_export]
+macro_rules! log {
+    ( $( $t:tt )* ) => {
+        web_sys::console::log_1(&format!( $( $t )* ).into());
+    }
+}
+
+#[wasm_bindgen]
+pub fn init_game() {
+    log!("initialising wasm");
+    utils::set_panic_hook();
+
+    #[cfg(feature = "random_init")]
+    log!("random layout enabled");
+}
+
+ \ No newline at end of file diff --git a/doc/src/draught/utils.rs.html b/doc/src/draught/utils.rs.html new file mode 100644 index 0000000..bdcefa1 --- /dev/null +++ b/doc/src/draught/utils.rs.html @@ -0,0 +1,27 @@ +utils.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+
+pub fn set_panic_hook() {
+    // When the `console_error_panic_hook` feature is enabled, we can call the
+    // `set_panic_hook` function at least once during initialization, and then
+    // we will get better error messages if our code ever panics.
+    //
+    // For more details see
+    // https://github.com/rustwasm/console_error_panic_hook#readme
+    #[cfg(feature = "console_error_panic_hook")]
+    console_error_panic_hook::set_once();
+}
+
+
+ \ No newline at end of file diff --git a/doc/storage.js b/doc/storage.js new file mode 100644 index 0000000..7737953 --- /dev/null +++ b/doc/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function updateLocalStorage(name,value){try{window.localStorage.setItem(name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem(name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){var cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||"light",true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/doc/theme.js b/doc/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/doc/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/doc/wheel.svg b/doc/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/doc/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..47ce3d6 --- /dev/null +++ b/index.html @@ -0,0 +1,58 @@ + + + + + + + + game of life + + + + +
+
+

Draught 🚀

+
+
+
+
+

Working on an implementation of checkers in Rust WASM with a thin Js frontend, mainly as an exercise to learn Rust and to have a larger project in the language to fiddle with. The idea is to use the minimax algorithm to create an AI player that can operate with reasonable performance as a result of Rust's compiled performance.

+
+
+
+
+ Docs +
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/index_js.bootstrap.js b/index_js.bootstrap.js new file mode 100644 index 0000000..38c813a --- /dev/null +++ b/index_js.bootstrap.js @@ -0,0 +1,44 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +(self["webpackChunkdraught"] = self["webpackChunkdraught"] || []).push([["index_js"],{ + +/***/ "../pkg/draught_bg.js": +/*!****************************!*\ + !*** ../pkg/draught_bg.js ***! + \****************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__) => {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"init_game\": () => (/* binding */ init_game),\n/* harmony export */ \"Team\": () => (/* binding */ Team),\n/* harmony export */ \"Strength\": () => (/* binding */ Strength),\n/* harmony export */ \"SquareState\": () => (/* binding */ SquareState),\n/* harmony export */ \"Moveable\": () => (/* binding */ Moveable),\n/* harmony export */ \"Board\": () => (/* binding */ Board),\n/* harmony export */ \"BrdIdx\": () => (/* binding */ BrdIdx),\n/* harmony export */ \"Game\": () => (/* binding */ Game),\n/* harmony export */ \"Piece\": () => (/* binding */ Piece),\n/* harmony export */ \"Square\": () => (/* binding */ Square),\n/* harmony export */ \"__wbindgen_string_new\": () => (/* binding */ __wbindgen_string_new),\n/* harmony export */ \"__wbindgen_object_drop_ref\": () => (/* binding */ __wbindgen_object_drop_ref),\n/* harmony export */ \"__wbg_log_9a99fb1af846153b\": () => (/* binding */ __wbg_log_9a99fb1af846153b),\n/* harmony export */ \"__wbg_new_59cb74e423758ede\": () => (/* binding */ __wbg_new_59cb74e423758ede),\n/* harmony export */ \"__wbg_stack_558ba5917b466edd\": () => (/* binding */ __wbg_stack_558ba5917b466edd),\n/* harmony export */ \"__wbg_error_4bb6c2a97407129a\": () => (/* binding */ __wbg_error_4bb6c2a97407129a),\n/* harmony export */ \"__wbindgen_throw\": () => (/* binding */ __wbindgen_throw)\n/* harmony export */ });\n/* harmony import */ var _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draught_bg.wasm */ \"../pkg/draught_bg.wasm\");\n/* module decorator */ module = __webpack_require__.hmd(module);\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__]);\n_draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? await __webpack_async_dependencies__ : __webpack_async_dependencies__)[0];\n\n\nconst lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;\n\nlet cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.memory.buffer) {\n cachegetUint8Memory0 = new Uint8Array(_draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.memory.buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction getObject(idx) { return heap[idx]; }\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n*/\nfunction init_game() {\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.init_game();\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;\n\nlet cachedTextEncoder = new lTextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length);\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len);\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3);\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachegetInt32Memory0 = null;\nfunction getInt32Memory0() {\n if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.memory.buffer) {\n cachegetInt32Memory0 = new Int32Array(_draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.memory.buffer);\n }\n return cachegetInt32Memory0;\n}\n/**\n*/\nconst Team = Object.freeze({ Black:0,\"0\":\"Black\",White:1,\"1\":\"White\", });\n/**\n*/\nconst Strength = Object.freeze({ Man:0,\"0\":\"Man\",King:1,\"1\":\"King\", });\n/**\n*/\nconst SquareState = Object.freeze({ Empty:0,\"0\":\"Empty\",Occupied:1,\"1\":\"Occupied\",Unplayable:2,\"2\":\"Unplayable\", });\n/**\n*/\nconst Moveable = Object.freeze({ Allowed:0,\"0\":\"Allowed\",Occupied:1,\"1\":\"Occupied\",OutOfBounds:2,\"2\":\"OutOfBounds\", });\n/**\n* Models a single state for a checkers board\n*/\nclass Board {\n\n static __wrap(ptr) {\n const obj = Object.create(Board.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbg_board_free(ptr);\n }\n /**\n * @param {number} idx\n * @returns {Square}\n */\n cell(idx) {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_cell(this.ptr, idx);\n return Square.__wrap(ret);\n }\n /**\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n grid_cell(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_grid_cell(this.ptr, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * @param {number} row\n * @param {number} col\n * @returns {number}\n */\n cell_index(row, col) {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_cell_index(this.ptr, row, col);\n return ret >>> 0;\n }\n /**\n * @param {BrdIdx} idx\n * @returns {number}\n */\n cell_idx(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_cell_idx(this.ptr, ptr0);\n return ret >>> 0;\n }\n /**\n * @param {number} idx\n * @returns {BrdIdx}\n */\n board_index(idx) {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_board_index(this.ptr, idx);\n return BrdIdx.__wrap(ret);\n }\n /**\n * @param {number} width\n * @param {number} height\n * @returns {Board}\n */\n static new(width, height) {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_new(width, height);\n return Board.__wrap(ret);\n }\n /**\n * @param {Board} board\n * @returns {Board}\n */\n static init_game(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_init_game(ptr0);\n return Board.__wrap(ret);\n }\n /**\n * @returns {number}\n */\n current_turn() {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n cells() {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_cells(this.ptr);\n return ret;\n }\n /**\n * @returns {number}\n */\n num_cells() {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_num_cells(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} idx\n * @returns {number}\n */\n cell_state(idx) {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.board_cell_state(this.ptr, idx);\n return ret >>> 0;\n }\n}\n/**\n*/\nclass BrdIdx {\n\n static __wrap(ptr) {\n const obj = Object.create(BrdIdx.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbg_brdidx_free(ptr);\n }\n /**\n * @param {number} row\n * @param {number} col\n * @returns {BrdIdx}\n */\n static from(row, col) {\n var ret = _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.brdidx_from(row, col);\n return BrdIdx.__wrap(ret);\n }\n}\n/**\n*/\nclass Game {\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbg_game_free(ptr);\n }\n}\n/**\n*/\nclass Piece {\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbg_piece_free(ptr);\n }\n}\n/**\n*/\nclass Square {\n\n static __wrap(ptr) {\n const obj = Object.create(Square.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbg_square_free(ptr);\n }\n}\n\nfunction __wbindgen_string_new(arg0, arg1) {\n var ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n};\n\nfunction __wbindgen_object_drop_ref(arg0) {\n takeObject(arg0);\n};\n\nfunction __wbg_log_9a99fb1af846153b(arg0) {\n console.log(getObject(arg0));\n};\n\nfunction __wbg_new_59cb74e423758ede() {\n var ret = new Error();\n return addHeapObject(ret);\n};\n\nfunction __wbg_stack_558ba5917b466edd(arg0, arg1) {\n var ret = getObject(arg1).stack;\n var ptr0 = passStringToWasm0(ret, _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbindgen_malloc, _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nfunction __wbg_error_4bb6c2a97407129a(arg0, arg1) {\n try {\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n _draught_bg_wasm__WEBPACK_IMPORTED_MODULE_0__.__wbindgen_free(arg0, arg1);\n }\n};\n\nfunction __wbindgen_throw(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\n\n});\n\n//# sourceURL=webpack://draught/../pkg/draught_bg.js?"); + +/***/ }), + +/***/ "../pkg/draught_bg.wasm": +/*!******************************!*\ + !*** ../pkg/draught_bg.wasm ***! + \******************************/ +/***/ ((module, exports, __webpack_require__) => { + +"use strict"; +eval("var __webpack_instantiate__ = ([WEBPACK_IMPORTED_MODULE_0]) => {\n\treturn __webpack_require__.v(exports, module.id, \"4d68ea94c77e642d94c7\", {\n\t\t\"./draught_bg.js\": {\n\t\t\t\"__wbindgen_string_new\": WEBPACK_IMPORTED_MODULE_0.__wbindgen_string_new,\n\t\t\t\"__wbindgen_object_drop_ref\": WEBPACK_IMPORTED_MODULE_0.__wbindgen_object_drop_ref,\n\t\t\t\"__wbg_log_9a99fb1af846153b\": WEBPACK_IMPORTED_MODULE_0.__wbg_log_9a99fb1af846153b,\n\t\t\t\"__wbg_new_59cb74e423758ede\": WEBPACK_IMPORTED_MODULE_0.__wbg_new_59cb74e423758ede,\n\t\t\t\"__wbg_stack_558ba5917b466edd\": WEBPACK_IMPORTED_MODULE_0.__wbg_stack_558ba5917b466edd,\n\t\t\t\"__wbg_error_4bb6c2a97407129a\": WEBPACK_IMPORTED_MODULE_0.__wbg_error_4bb6c2a97407129a,\n\t\t\t\"__wbindgen_throw\": WEBPACK_IMPORTED_MODULE_0.__wbindgen_throw\n\t\t}\n\t});\n}\n__webpack_require__.a(module, (__webpack_handle_async_dependencies__) => {\n\t/* harmony import */ var WEBPACK_IMPORTED_MODULE_0 = __webpack_require__(/*! ./draught_bg.js */ \"../pkg/draught_bg.js\");\n\tvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([WEBPACK_IMPORTED_MODULE_0]);\n\treturn __webpack_async_dependencies__.then ? __webpack_async_dependencies__.then(__webpack_instantiate__) : __webpack_instantiate__(__webpack_async_dependencies__);\n}, 1);\n\n//# sourceURL=webpack://draught/../pkg/draught_bg.wasm?"); + +/***/ }), + +/***/ "./index.js": +/*!******************!*\ + !*** ./index.js ***! + \******************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__) => {\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var draught__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! draught */ \"../pkg/draught_bg.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([draught__WEBPACK_IMPORTED_MODULE_0__]);\ndraught__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? await __webpack_async_dependencies__ : __webpack_async_dependencies__)[0];\n\n\n\n// let PLAY = true;\n// let PLAY = false;\n(0,draught__WEBPACK_IMPORTED_MODULE_0__.init_game)();\n\nconst canvas = document.getElementById(\"game-canvas\");\nconst ctx = canvas.getContext('2d');\n\n});\n\n//# sourceURL=webpack://draught/./index.js?"); + +/***/ }) + +}]); \ No newline at end of file