deploy: 8dbc2eb586
This commit is contained in:
parent
2edf48854e
commit
5d9449723e
Binary file not shown.
2
10.bootstrap.js
Normal file
2
10.bootstrap.js
Normal file
@ -0,0 +1,2 @@
|
||||
(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(e,n,t)=>{"use strict";t.a(e,(async r=>{t.d(n,{QC:()=>s,h4:()=>p,ug:()=>O,a:()=>T,h9:()=>k,Dz:()=>v,kF:()=>j,Or:()=>E});var c=t(813);e=t.hmd(e);var o=r([c]);c=(o.then?await o:o)[0];let u=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});u.decode();let a=null;function l(){return null!==a&&a.buffer===c.memory.buffer||(a=new Uint8Array(c.memory.buffer)),a}function i(e,n){return u.decode(l().subarray(e,e+n))}const f=new Array(32).fill(void 0);f.push(void 0,null,!0,!1);let d=f.length;function b(e){d===f.length&&f.push(f.length+1);const n=d;return d=f[n],f[n]=e,n}function g(e){return f[e]}function s(){c.init_game()}let _=0,h=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const w="function"==typeof h.encodeInto?function(e,n){return h.encodeInto(e,n)}:function(e,n){const t=h.encode(e);return n.set(t),{read:e.length,written:t.length}};let m=null;function y(){return null!==m&&m.buffer===c.memory.buffer||(m=new Int32Array(c.memory.buffer)),m}function p(e,n){return b(i(e,n))}function O(e){!function(e){const n=g(e);(function(e){e<36||(f[e]=d,d=e)})(e)}(e)}function T(e){console.log(g(e))}function k(){return b(new Error)}function v(e,n){var t=function(e,n,t){if(void 0===t){const t=h.encode(e),r=n(t.length);return l().subarray(r,r+t.length).set(t),_=t.length,r}let r=e.length,c=n(r);const o=l();let u=0;for(;u<r;u++){const n=e.charCodeAt(u);if(n>127)break;o[c+u]=n}if(u!==r){0!==u&&(e=e.slice(u)),c=t(c,r,r=u+3*e.length);const n=l().subarray(c+u,c+r);u+=w(e,n).written}return _=u,c}(g(n).stack,c.__wbindgen_malloc,c.__wbindgen_realloc),r=_;y()[e/4+1]=r,y()[e/4+0]=t}function j(e,n){try{console.error(i(e,n))}finally{c.__wbindgen_free(e,n)}}function E(e,n){throw new Error(i(e,n))}Object.freeze({Black:0,0:"Black",White:1,1:"White"}),Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"}),Object.freeze({Allowed:0,0:"Allowed",UnoccupiedSrc:1,1:"UnoccupiedSrc",OccupiedDest:2,2:"OccupiedDest",OutOfBounds:3,3:"OutOfBounds",Unplayable:4,4:"Unplayable",WrongTeamSrc:5,5:"WrongTeamSrc",IllegalTrajectory:6,6:"IllegalTrajectory",NoJumpablePiece:7,7:"NoJumpablePiece",JumpingSameTeam:8,8:"JumpingSameTeam"})}))},813:(e,n,t)=>{"use strict";var r=([r])=>t.v(n,e.id,"ec83f0cc0b0f5722fdc1",{"./draught_bg.js":{__wbindgen_string_new:r.h4,__wbindgen_object_drop_ref:r.ug,__wbg_log_9a99fb1af846153b:r.a,__wbg_new_59cb74e423758ede:r.h9,__wbg_stack_558ba5917b466edd:r.Dz,__wbg_error_4bb6c2a97407129a:r.kF,__wbindgen_throw:r.Or}});t.a(e,(e=>{var n=e([t(171)]);return n.then?n.then(r):r(n)}),1)},10:(e,n,t)=>{"use strict";t.a(e,(async e=>{t.r(n);var r=t(171),c=e([r]);(0,(r=(c.then?await c:c)[0]).QC)(),document.getElementById("game-canvas").getContext("2d")}))}}]);
|
||||
//# sourceMappingURL=10.bootstrap.js.map
|
1
10.bootstrap.js.map
Normal file
1
10.bootstrap.js.map
Normal file
File diff suppressed because one or more lines are too long
381
bootstrap.js
vendored
381
bootstrap.js
vendored
@ -1,379 +1,2 @@
|
||||
/*
|
||||
* 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");
|
||||
/******/
|
||||
/******/ })()
|
||||
;
|
||||
(()=>{var e,r,t,n,o,a,i,s={},c={};function l(e){var r=c[e];if(void 0!==r)return r.exports;var t=c[e]={id:e,loaded:!1,exports:{}};return s[e](t,t.exports,l),t.loaded=!0,t.exports}l.m=s,e="function"==typeof Symbol?Symbol("webpack then"):"__webpack_then__",r="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t=e=>{e&&(e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},n=e=>!--e.r&&e(),o=(e,r)=>e?e.push(r):n(r),l.a=(a,i,s)=>{var c,l,u,p=s&&[],d=a.exports,h=!0,f=!1,b=(r,t,n)=>{f||(f=!0,t.r+=r.length,r.map(((r,o)=>r[e](t,n))),f=!1)},m=new Promise(((e,r)=>{u=r,l=()=>(e(d),t(p),p=0)}));m[r]=d,m[e]=(e,r)=>{if(h)return n(e);c&&b(c,e,r),o(p,e),m.catch(r)},a.exports=m,i((a=>{if(!a)return l();var i,s;c=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var i=[];a.then((e=>{s[r]=e,t(i),i=0}));var s={[e]:(e,r)=>(o(i,e),a.catch(r))};return s}}return{[e]:e=>n(e),[r]:a}})))(a);var u=new Promise(((e,t)=>{(i=()=>e(s=c.map((e=>e[r])))).r=0,b(c,i,t)}));return i.r?u:s})).then(l,u),h=!1},l.d=(e,r)=>{for(var t in r)l.o(r,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((r,t)=>(l.f[t](e,r),r)),[])),l.u=e=>e+".bootstrap.js",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),a={},i="draught:",l.l=(e,r,t,n)=>{if(a[e])a[e].push(r);else{var o,s;if(void 0!==t)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==i+t){o=p;break}}o||(s=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,l.nc&&o.setAttribute("nonce",l.nc),o.setAttribute("data-webpack",i+t),o.src=e),a[e]=[r];var d=(r,t)=>{o.onerror=o.onload=null,clearTimeout(h);var n=a[e];if(delete a[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(t))),r)return r(t)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),s&&document.head.appendChild(o)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var r=l.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})(),(()=>{var e={179:0};l.f.j=(r,t)=>{var n=l.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=l.p+l.u(r),i=new Error;l.l(a,(t=>{if(l.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,s]=t,c=0;for(n in i)l.o(i,n)&&(l.m[n]=i[n]);for(s&&s(l),r&&r(t);c<a.length;c++)o=a[c],l.o(e,o)&&e[o]&&e[o][0](),e[a[c]]=0},t=self.webpackChunkdraught=self.webpackChunkdraught||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),l.v=(e,r,t,n)=>{var o=fetch(l.p+""+t+".module.wasm");return"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(o,n).then((r=>Object.assign(e,r.instance.exports))):o.then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,n))).then((r=>Object.assign(e,r.instance.exports)))},l.e(10).then(l.bind(l,10)).catch((e=>console.error("Error importing `index.js`:",e)))})();
|
||||
//# sourceMappingURL=bootstrap.js.map
|
1
bootstrap.js.map
Normal file
1
bootstrap.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -3,5 +3,5 @@
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate draught</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span>
|
||||
</span>
|
||||
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="board/struct.Board.html">board::Board</a></li><li><a href="board/struct.BrdIdx.html">board::BrdIdx</a></li><li><a href="board/struct.Direction.html">board::Direction</a></li><li><a href="board/struct.Piece.html">board::Piece</a></li><li><a href="board/struct.Square.html">board::Square</a></li><li><a href="board/iter/struct.RowIndexIterator.html">board::iter::RowIndexIterator</a></li><li><a href="board/iter/struct.RowSquareIterator.html">board::iter::RowSquareIterator</a></li><li><a href="game/struct.Game.html">game::Game</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="board/enums/enum.Moveable.html">board::enums::Moveable</a></li><li><a href="board/enums/enum.SquareState.html">board::enums::SquareState</a></li><li><a href="board/enums/enum.Strength.html">board::enums::Strength</a></li><li><a href="board/enums/enum.Team.html">board::enums::Team</a></li></ul><h3 id="Macros">Macros</h3><ul class="macros docblock"><li><a href="macro.log.html">log</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.__wasm_bindgen_generated_init_game.html">__wasm_bindgen_generated_init_game</a></li><li><a href="fn.init_game.html">init_game</a></li><li><a href="utils/fn.set_panic_hook.html">utils::set_panic_hook</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="board/constant.STD_HEIGHT.html">board::STD_HEIGHT</a></li><li><a href="board/constant.STD_WIDTH.html">board::STD_WIDTH</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="board/struct.Board.html">board::Board</a></li><li><a href="board/struct.BrdIdx.html">board::BrdIdx</a></li><li><a href="board/struct.Direction.html">board::Direction</a></li><li><a href="board/struct.Piece.html">board::Piece</a></li><li><a href="board/struct.Square.html">board::Square</a></li><li><a href="board/iter/struct.PieceIterator.html">board::iter::PieceIterator</a></li><li><a href="board/iter/struct.RowIndexIterator.html">board::iter::RowIndexIterator</a></li><li><a href="board/iter/struct.RowSquareIterator.html">board::iter::RowSquareIterator</a></li><li><a href="game/struct.Game.html">game::Game</a></li><li><a href="player/struct.Player.html">player::Player</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="board/enums/enum.Moveable.html">board::enums::Moveable</a></li><li><a href="board/enums/enum.SquareState.html">board::enums::SquareState</a></li><li><a href="board/enums/enum.Strength.html">board::enums::Strength</a></li><li><a href="board/enums/enum.Team.html">board::enums::Team</a></li></ul><h3 id="Macros">Macros</h3><ul class="macros docblock"><li><a href="macro.log.html">log</a></li></ul><h3 id="Functions">Functions</h3><ul class="functions docblock"><li><a href="fn.__wasm_bindgen_generated_init_game.html">__wasm_bindgen_generated_init_game</a></li><li><a href="fn.init_game.html">init_game</a></li><li><a href="utils/fn.set_panic_hook.html">utils::set_panic_hook</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="board/constant.STD_HEIGHT.html">board::STD_HEIGHT</a></li><li><a href="board/constant.STD_WIDTH.html">board::STD_WIDTH</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
<script src="../main.js"></script></body></html>
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Standard height of a checkers board is 8 squares"><meta name="keywords" content="rust, rustlang, rust-lang, STD_HEIGHT"><title>draught::board::STD_HEIGHT - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">board</a></p><div id="sidebar-vars" data-name="STD_HEIGHT" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_HEIGHT</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#20" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_HEIGHT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard height of a checkers board is 8 squares</p>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_HEIGHT</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#23" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_HEIGHT: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard height of a checkers board is 8 squares</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-js="../../search-index.js"></div>
|
||||
<script src="../../main.js"></script></body></html>
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Standard width of a checkers board is 8 squares"><meta name="keywords" content="rust, rustlang, rust-lang, STD_WIDTH"><title>draught::board::STD_WIDTH - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">board</a></p><div id="sidebar-vars" data-name="STD_WIDTH" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_WIDTH</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#18" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard width of a checkers board is 8 squares</p>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../index.html">draught</a>::<wbr><a href="index.html">board</a>::<wbr><a class="constant" href="">STD_WIDTH</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#21" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const STD_WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> = 8;</pre><div class="docblock"><p>Standard width of a checkers board is 8 squares</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-js="../../search-index.js"></div>
|
||||
<script src="../../main.js"></script></body></html>
|
@ -1,14 +1,14 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Board module for components related to the checkers board and game structure"><meta name="keywords" content="rust, rustlang, rust-lang, board"><title>draught::board - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module board</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="board" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">board</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#1-630" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Board module for components related to the checkers board and game structure</p>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">board</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/board/mod.rs.html#1-740" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Board module for components related to the checkers board and game structure</p>
|
||||
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="enums/index.html" title="draught::board::enums mod">enums</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="iter/index.html" title="draught::board::iter mod">iter</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Board.html" title="draught::board::Board struct">Board</a></td><td class="docblock-short"><p>Models a single state for a checkers board</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.BrdIdx.html" title="draught::board::BrdIdx struct">BrdIdx</a></td><td class="docblock-short"><p>Model a rank 2 tensor index to identify a board square by row and column</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Direction.html" title="draught::board::Direction struct">Direction</a></td><td class="docblock-short"><p>Model the standard diagonal movements by north west/east etc</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Piece.html" title="draught::board::Piece struct">Piece</a></td><td class="docblock-short"><p>Model a game piece by its team and strength (normal or kinged)</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Square.html" title="draught::board::Square struct">Square</a></td><td class="docblock-short"><p>Model board squares by a state and a possible occupying game piece</p>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Board.html" title="draught::board::Board struct">Board</a></td><td class="docblock-short"><p>Single state of a checkers board</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.BrdIdx.html" title="draught::board::BrdIdx struct">BrdIdx</a></td><td class="docblock-short"><p>Rank 2 tensor index to identify a board square by row and column</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Direction.html" title="draught::board::Direction struct">Direction</a></td><td class="docblock-short"><p>Standard diagonal movements given by north west/east etc</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Piece.html" title="draught::board::Piece struct">Piece</a></td><td class="docblock-short"><p>Game piece given by its team and strength (normal or kinged)</p>
|
||||
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Square.html" title="draught::board::Square struct">Square</a></td><td class="docblock-short"><p>Board squares given by a state and a possible occupying game piece</p>
|
||||
</td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
|
||||
<table><tr class="module-item"><td><a class="constant" href="constant.STD_HEIGHT.html" title="draught::board::STD_HEIGHT constant">STD_HEIGHT</a></td><td class="docblock-short"><p>Standard height of a checkers board is 8 squares</p>
|
||||
</td></tr><tr class="module-item"><td><a class="constant" href="constant.STD_WIDTH.html" title="draught::board::STD_WIDTH constant">STD_WIDTH</a></td><td class="docblock-short"><p>Standard width of a checkers board is 8 squares</p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `iter` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, iter"><title>draught::board::iter - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module iter</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a></p><div id="sidebar-vars" data-name="iter" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a class="mod" href="">iter</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#1-106" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.RowIndexIterator.html" title="draught::board::iter::RowIndexIterator struct">RowIndexIterator</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RowSquareIterator.html" title="draught::board::iter::RowSquareIterator struct">RowSquareIterator</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-js="../../../search-index.js"></div>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a class="mod" href="">iter</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#1-194" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.PieceIterator.html" title="draught::board::iter::PieceIterator struct">PieceIterator</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RowIndexIterator.html" title="draught::board::iter::RowIndexIterator struct">RowIndexIterator</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.RowSquareIterator.html" title="draught::board::iter::RowSquareIterator struct">RowSquareIterator</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-js="../../../search-index.js"></div>
|
||||
<script src="../../../main.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"struct":[["RowIndexIterator",""],["RowSquareIterator",""]]});
|
||||
initSidebarItems({"struct":[["PieceIterator",""],["RowIndexIterator",""],["RowSquareIterator",""]]});
|
142
doc/draught/board/iter/struct.PieceIterator.html
Normal file
142
doc/draught/board/iter/struct.PieceIterator.html
Normal file
@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `PieceIterator` struct in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, PieceIterator"><title>draught::board::iter::PieceIterator - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct PieceIterator</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.board">board</a><a href="#structfield.index_cursor">index_cursor</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Iterator">Iterator</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-IteratorRandom">IteratorRandom</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a></p><div id="sidebar-vars" data-name="PieceIterator" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a>::<wbr><a class="struct" href="">PieceIterator</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#71-74" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct PieceIterator<'a> {
|
||||
board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
||||
index_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.index_cursor" class="structfield small-section-header"><a href="#structfield.index_cursor" class="anchor field"></a><code>index_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#76-83" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a class="srclink" href="../../../src/draught/board/iter.rs.html#77-82" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Iterator" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl-Iterator" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#85-101" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="../../../draught/board/struct.Square.html" title="struct draught::board::Square">Square</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||||
</div><h4 id="method.next" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="../../../draught/board/struct.Square.html" title="struct draught::board::Square">Square</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code><a class="srclink" href="../../../src/draught/board/iter.rs.html#89-100" title="goto source code">[src]</a></h4><div class="docblock"><p>Get next item from the iterator</p>
|
||||
</div><h4 id="method.size_hint" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#205" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the bounds on the remaining length of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint">Read more</a></p>
|
||||
</div><h4 id="method.count" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count" class="fnname">count</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#242-244" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes the iterator, counting the number of iterations and returning it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count">Read more</a></p>
|
||||
</div><h4 id="method.last" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last" class="fnname">last</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#272-274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes the iterator, returning the last element. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last">Read more</a></p>
|
||||
</div><h4 id="method.advance_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.advance_by" class="fnname">advance_by</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#315" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_advance_by</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Advances the iterator by <code>n</code> elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.advance_by">Read more</a></p>
|
||||
</div><h4 id="method.nth" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.nth" class="fnname">nth</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#363" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the <code>n</code>th element of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.nth">Read more</a></p>
|
||||
</div><h4 id="method.step_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.step_by" class="fnname">step_by</a>(self, step: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/step_by/struct.StepBy.html" title="struct core::iter::adapters::step_by::StepBy">StepBy</a><Self></code><span class="since" title="Stable since Rust version 1.28.0">1.28.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#414-416" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator starting at the same point, but stepping by
|
||||
the given amount at each iteration. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.step_by">Read more</a></p>
|
||||
</div><h4 id="method.chain" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.chain" class="fnname">chain</a><U>(self, other: U) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/chain/struct.Chain.html" title="struct core::iter::adapters::chain::Chain">Chain</a><Self, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>> <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#485-488" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Takes two iterators and creates a new iterator over both in sequence. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.chain">Read more</a></p>
|
||||
</div><h4 id="method.zip" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.zip" class="fnname">zip</a><U>(self, other: U) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/zip/struct.Zip.html" title="struct core::iter::adapters::zip::Zip">Zip</a><Self, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>> <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#561-564" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>‘Zips up’ two iterators into a single iterator of pairs. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.zip">Read more</a></p>
|
||||
</div><h4 id="method.intersperse" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.intersperse" class="fnname">intersperse</a>(self, separator: Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/intersperse/struct.Intersperse.html" title="struct core::iter::adapters::intersperse::Intersperse">Intersperse</a><Self> <span class="where fmt-newline">where<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#603-606" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_intersperse</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Creates a new iterator which places a copy of <code>separator</code> between adjacent
|
||||
items of the original iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.intersperse">Read more</a></p>
|
||||
</div><h4 id="method.intersperse_with" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with" class="fnname">intersperse_with</a><G>(self, separator: G) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/intersperse/struct.IntersperseWith.html" title="struct core::iter::adapters::intersperse::IntersperseWith">IntersperseWith</a><Self, G> <span class="where fmt-newline">where<br> G: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#661-664" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_intersperse</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Creates a new iterator which places an item generated by <code>separator</code>
|
||||
between adjacent items of the original iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with">Read more</a></p>
|
||||
</div><h4 id="method.map" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map" class="fnname">map</a><B, F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/map/struct.Map.html" title="struct core::iter::adapters::map::Map">Map</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#720-723" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Takes a closure and creates an iterator which calls that closure on each
|
||||
element. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map">Read more</a></p>
|
||||
</div><h4 id="method.for_each" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.for_each" class="fnname">for_each</a><F>(self, f: F) <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>), </span></code><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#765-768" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Calls a closure on each element of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.for_each">Read more</a></p>
|
||||
</div><h4 id="method.filter" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter" class="fnname">filter</a><P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/filter/struct.Filter.html" title="struct core::iter::adapters::filter::Filter">Filter</a><Self, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#840-843" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator which uses a closure to determine if an element
|
||||
should be yielded. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter">Read more</a></p>
|
||||
</div><h4 id="method.filter_map" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter_map" class="fnname">filter_map</a><B, F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/filter_map/struct.FilterMap.html" title="struct core::iter::adapters::filter_map::FilterMap">FilterMap</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#885-888" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that both filters and maps. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.filter_map">Read more</a></p>
|
||||
</div><h4 id="method.enumerate" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.enumerate" class="fnname">enumerate</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/enumerate/struct.Enumerate.html" title="struct core::iter::adapters::enumerate::Enumerate">Enumerate</a><Self></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#932-934" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator which gives the current iteration count as well as
|
||||
the next value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.enumerate">Read more</a></p>
|
||||
</div><h4 id="method.peekable" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.peekable" class="fnname">peekable</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/peekable/struct.Peekable.html" title="struct core::iter::adapters::peekable::Peekable">Peekable</a><Self></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#981-983" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator which can use <a href="https://doc.rust-lang.org/nightly/core/iter/adapters/peekable/struct.Peekable.html#method.peek"><code>peek</code></a> to look at the next element of
|
||||
the iterator without consuming it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.peekable">Read more</a></p>
|
||||
</div><h4 id="method.skip_while" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip_while" class="fnname">skip_while</a><P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/skip_while/struct.SkipWhile.html" title="struct core::iter::adapters::skip_while::SkipWhile">SkipWhile</a><Self, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1045-1048" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip"><code>skip</code></a>s elements based on a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip_while">Read more</a></p>
|
||||
</div><h4 id="method.take_while" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take_while" class="fnname">take_while</a><P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/take_while/struct.TakeWhile.html" title="struct core::iter::adapters::take_while::TakeWhile">TakeWhile</a><Self, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1126-1129" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that yields elements based on a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take_while">Read more</a></p>
|
||||
</div><h4 id="method.map_while" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map_while" class="fnname">map_while</a><B, P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/map_while/struct.MapWhile.html" title="struct core::iter::adapters::map_while::MapWhile">MapWhile</a><Self, P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1221-1224" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_map_while</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Creates an iterator that both yields elements based on a predicate and maps. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.map_while">Read more</a></p>
|
||||
</div><h4 id="method.skip" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip" class="fnname">skip</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/skip/struct.Skip.html" title="struct core::iter::adapters::skip::Skip">Skip</a><Self></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1248-1250" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that skips the first <code>n</code> elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.skip">Read more</a></p>
|
||||
</div><h4 id="method.take" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take" class="fnname">take</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/take/struct.Take.html" title="struct core::iter::adapters::take::Take">Take</a><Self></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1294-1296" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that yields its first <code>n</code> elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.take">Read more</a></p>
|
||||
</div><h4 id="method.scan" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.scan" class="fnname">scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/scan/struct.Scan.html" title="struct core::iter::adapters::scan::Scan">Scan</a><Self, St, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>St, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1338-1341" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>An iterator adaptor similar to <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fold"><code>fold</code></a> that holds internal state and
|
||||
produces a new iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.scan">Read more</a></p>
|
||||
</div><h4 id="method.flat_map" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.flat_map" class="fnname">flat_map</a><U, F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/flatten/struct.FlatMap.html" title="struct core::iter::adapters::flatten::FlatMap">FlatMap</a><Self, U, F> <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> U, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1378-1382" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that works like map, but flattens nested structure. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.flat_map">Read more</a></p>
|
||||
</div><h4 id="method.flatten" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.flatten" class="fnname">flatten</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/flatten/struct.Flatten.html" title="struct core::iter::adapters::flatten::Flatten">Flatten</a><Self> <span class="where fmt-newline">where<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></code><span class="since" title="Stable since Rust version 1.29.0">1.29.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1450-1453" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator that flattens nested structure. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.flatten">Read more</a></p>
|
||||
</div><h4 id="method.fuse" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fuse" class="fnname">fuse</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/fuse/struct.Fuse.html" title="struct core::iter::adapters::fuse::Fuse">Fuse</a><Self></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1513-1515" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator which ends after the first <a href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fuse">Read more</a></p>
|
||||
</div><h4 id="method.inspect" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.inspect" class="fnname">inspect</a><F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/inspect/struct.Inspect.html" title="struct core::iter::adapters::inspect::Inspect">Inspect</a><Self, F> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>), </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1597-1600" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Does something with each element of an iterator, passing the value on. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.inspect">Read more</a></p>
|
||||
</div><h4 id="method.by_ref" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.by_ref" class="fnname">by_ref</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1642-1644" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Borrows an iterator, rather than consuming it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.by_ref">Read more</a></p>
|
||||
</div><h4 id="method.collect" class="method hidden"><code><span class="docblock attributes">#[must_use =
|
||||
"if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect" class="fnname">collect</a><B>(self) -> B <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1760-1762" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Transforms an iterator into a collection. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.collect">Read more</a></p>
|
||||
</div><h4 id="method.partition" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partition" class="fnname">partition</a><B, F>(self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>B, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1793-1797" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes an iterator, creating two collections from it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partition">Read more</a></p>
|
||||
</div><h4 id="method.partition_in_place" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partition_in_place" class="fnname">partition_in_place</a><'a, T, P>(self, predicate: P) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a mut </a>T>,<br> T: 'a,<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1848-1851" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_partition_in_place</code>)</summary><p>new API</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Reorders the elements of this iterator <em>in-place</em> according to the given predicate,
|
||||
such that all those that return <code>true</code> precede all those that return <code>false</code>.
|
||||
Returns the number of <code>true</code> elements found. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partition_in_place">Read more</a></p>
|
||||
</div><h4 id="method.is_partitioned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned" class="fnname">is_partitioned</a><P>(self, predicate: P) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1905-1908" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_is_partitioned</code>)</summary><p>new API</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Checks if the elements of this iterator are partitioned according to the given predicate,
|
||||
such that all those that return <code>true</code> precede all those that return <code>false</code>. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned">Read more</a></p>
|
||||
</div><h4 id="method.try_fold" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_fold" class="fnname">try_fold</a><B, F, R>(&mut self, init: B, f: F) -> R <span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try/trait.Try.html" title="trait core::ops::try::Try">Try</a><Ok = B>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R, </span></code><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#1974-1978" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>An iterator method that applies a function as long as it returns
|
||||
successfully, producing a single, final value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_fold">Read more</a></p>
|
||||
</div><h4 id="method.try_for_each" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each" class="fnname">try_for_each</a><F, R>(&mut self, f: F) -> R <span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try/trait.Try.html" title="trait core::ops::try::Try">Try</a><Ok = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R, </span></code><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2016-2020" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>An iterator method that applies a fallible function to each item in the
|
||||
iterator, stopping at the first error and returning that error. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each">Read more</a></p>
|
||||
</div><h4 id="method.fold" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fold" class="fnname">fold</a><B, F>(self, init: B, f: F) -> B <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2116-2119" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Folds every element into an accumulator by applying an operation,
|
||||
returning the final result. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.fold">Read more</a></p>
|
||||
</div><h4 id="method.reduce" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.reduce" class="fnname">reduce</a><F>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, </span></code><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2161-2164" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Reduces the elements to a single one, by repeatedly applying a reducing
|
||||
operation. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.reduce">Read more</a></p>
|
||||
</div><h4 id="method.all" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.all" class="fnname">all</a><F>(&mut self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2210-2213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Tests if every element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.all">Read more</a></p>
|
||||
</div><h4 id="method.any" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.any" class="fnname">any</a><F>(&mut self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2263-2266" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Tests if any element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.any">Read more</a></p>
|
||||
</div><h4 id="method.find" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find" class="fnname">find</a><P>(&mut self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2323-2326" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Searches for an element of an iterator that satisfies a predicate. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find">Read more</a></p>
|
||||
</div><h4 id="method.find_map" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find_map" class="fnname">find_map</a><B, F>(&mut self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>, </span></code><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2354-2357" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Applies function to the elements of iterator and returns
|
||||
the first non-none result. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.find_map">Read more</a></p>
|
||||
</div><h4 id="method.try_find" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_find" class="fnname">try_find</a><F, R>(<br> &mut self, <br> f: F<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>, <R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try/trait.Try.html" title="trait core::ops::try::Try">Try</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/try/trait.Try.html#associatedtype.Error" title="type core::ops::try::Try::Error">Error</a>> <span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/try/trait.Try.html" title="trait core::ops::try::Try">Try</a><Ok = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2392-2396" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>try_find</code>)</summary><p>new API</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Applies function to the elements of iterator and returns
|
||||
the first true result or the first error. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.try_find">Read more</a></p>
|
||||
</div><h4 id="method.position" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.position" class="fnname">position</a><P>(&mut self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2468-2471" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Searches for an element in an iterator, returning its index. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.position">Read more</a></p>
|
||||
</div><h4 id="method.rposition" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.rposition" class="fnname">rposition</a><P>(&mut self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html" title="trait core::iter::traits::exact_size::ExactSizeIterator">ExactSizeIterator</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2525-2528" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Searches for an element in an iterator from the right, returning its
|
||||
index. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.rposition">Read more</a></p>
|
||||
</div><h4 id="method.max" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max" class="fnname">max</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2564-2567" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the maximum element of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max">Read more</a></p>
|
||||
</div><h4 id="method.min" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min" class="fnname">min</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2590-2593" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the minimum element of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min">Read more</a></p>
|
||||
</div><h4 id="method.max_by_key" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key" class="fnname">max_by_key</a><B, F>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B, </span></code><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2612-2615" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the element that gives the maximum value from the
|
||||
specified function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key">Read more</a></p>
|
||||
</div><h4 id="method.max_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by" class="fnname">max_by</a><F>(self, compare: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>, </span></code><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2645-2648" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the element that gives the maximum value with respect to the
|
||||
specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.max_by">Read more</a></p>
|
||||
</div><h4 id="method.min_by_key" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key" class="fnname">min_by_key</a><B, F>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B, </span></code><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2672-2675" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the element that gives the minimum value from the
|
||||
specified function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key">Read more</a></p>
|
||||
</div><h4 id="method.min_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by" class="fnname">min_by</a><F>(self, compare: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>, </span></code><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2705-2708" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the element that gives the minimum value with respect to the
|
||||
specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.min_by">Read more</a></p>
|
||||
</div><h4 id="method.rev" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.rev" class="fnname">rev</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/rev/struct.Rev.html" title="struct core::iter::adapters::rev::Rev">Rev</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2742-2744" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Reverses an iterator’s direction. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.rev">Read more</a></p>
|
||||
</div><h4 id="method.unzip" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.unzip" class="fnname">unzip</a><A, B, FromA, FromB>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>FromA, FromB<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>A, B<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>,<br> FromA: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><A>,<br> FromB: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><B>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2772-2776" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Converts an iterator of pairs into a pair of containers. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.unzip">Read more</a></p>
|
||||
</div><h4 id="method.copied" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.copied" class="fnname">copied</a><'a, T>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/copied/struct.Copied.html" title="struct core::iter::adapters::copied::Copied">Copied</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T>,<br> T: 'a + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>, </span></code><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2823-2826" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator which copies all of its elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.copied">Read more</a></p>
|
||||
</div><h4 id="method.cloned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cloned" class="fnname">cloned</a><'a, T>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/cloned/struct.Cloned.html" title="struct core::iter::adapters::cloned::Cloned">Cloned</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>T>,<br> T: 'a + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2854-2857" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator which <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone"><code>clone</code></a>s all of its elements. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cloned">Read more</a></p>
|
||||
</div><h4 id="method.cycle" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cycle" class="fnname">cycle</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/cycle/struct.Cycle.html" title="struct core::iter::adapters::cycle::Cycle">Cycle</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2887-2889" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Repeats an iterator endlessly. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cycle">Read more</a></p>
|
||||
</div><h4 id="method.sum" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.sum" class="fnname">sum</a><S>(self) -> S <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/accum/trait.Sum.html" title="trait core::iter::traits::accum::Sum">Sum</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2917-2920" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Sums the elements of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.sum">Read more</a></p>
|
||||
</div><h4 id="method.product" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.product" class="fnname">product</a><P>(self) -> P <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/accum/trait.Product.html" title="trait core::iter::traits::accum::Product">Product</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2946-2949" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Iterates over the entire iterator, multiplying all the elements <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.product">Read more</a></p>
|
||||
</div><h4 id="method.cmp" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cmp" class="fnname">cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2967-2971" title="goto source code">[src]</a></h4><div class='docblock hidden'><p><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
|
||||
of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cmp">Read more</a></p>
|
||||
</div><h4 id="method.cmp_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by" class="fnname">cmp_by</a><I, F>(self, other: I, cmp: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#2996-3000" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_order_by</code>)</div></div><div class='docblock hidden'><p><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
|
||||
of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by">Read more</a></p>
|
||||
</div><h4 id="method.partial_cmp" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp" class="fnname">partial_cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3043-3047" title="goto source code">[src]</a></h4><div class='docblock hidden'><p><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
|
||||
of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp">Read more</a></p>
|
||||
</div><h4 id="method.partial_cmp_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by" class="fnname">partial_cmp_by</a><I, F>(self, other: I, partial_cmp: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>>,<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3081-3085" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_order_by</code>)</div></div><div class='docblock hidden'><p><a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those
|
||||
of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by">Read more</a></p>
|
||||
</div><h4 id="method.eq" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq" class="fnname">eq</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3123-3127" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are equal to those of
|
||||
another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq">Read more</a></p>
|
||||
</div><h4 id="method.eq_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq_by" class="fnname">eq_by</a><I, F>(self, other: I, eq: F) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3148-3152" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>iter_order_by</code>)</div></div><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are equal to those of
|
||||
another with respect to the specified equality function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.eq_by">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ne" class="fnname">ne</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3183-3187" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are unequal to those of
|
||||
another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ne">Read more</a></p>
|
||||
</div><h4 id="method.lt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.lt" class="fnname">lt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3204-3208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
|
||||
less than those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.lt">Read more</a></p>
|
||||
</div><h4 id="method.le" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.le" class="fnname">le</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3225-3229" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
|
||||
less or equal to those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.le">Read more</a></p>
|
||||
</div><h4 id="method.gt" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.gt" class="fnname">gt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3246-3250" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
|
||||
greater than those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.gt">Read more</a></p>
|
||||
</div><h4 id="method.ge" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ge" class="fnname">ge</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>, </span></code><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3267-3271" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Determines if the elements of this <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a>
|
||||
greater than or equal to those of another. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.ge">Read more</a></p>
|
||||
</div><h4 id="method.is_sorted" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted" class="fnname">is_sorted</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3298-3301" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>is_sorted</code>)</summary><p>new API</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Checks if the elements of this iterator are sorted. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted">Read more</a></p>
|
||||
</div><h4 id="method.is_sorted_by" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by" class="fnname">is_sorted_by</a><F>(self, compare: F) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>>, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3326-3329" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>is_sorted</code>)</summary><p>new API</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Checks if the elements of this iterator are sorted using the given comparator function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by">Read more</a></p>
|
||||
</div><h4 id="method.is_sorted_by_key" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key" class="fnname">is_sorted_by_key</a><F, K>(self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><K>,<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> K, </span></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#3372-3376" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>is_sorted</code>)</summary><p>new API</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Checks if the elements of this iterator are sorted using the given key extraction
|
||||
function. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key">Read more</a></p>
|
||||
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../draught/board/iter/struct.PieceIterator.html" title="struct draught::board::iter::PieceIterator">PieceIterator</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-IntoIterator" class="impl"><code class="in-band">impl<I> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for I <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>, </span></code><a href="#impl-IntoIterator" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#236-243" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="type">Item</a> = <I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||||
</div><h4 id="associatedtype.IntoIter" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="type">IntoIter</a> = I</code></h4><div class='docblock'><p>Which kind of iterator are we turning this into?</p>
|
||||
</div><h4 id="method.into_iter" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -> I</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#240" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates an iterator from a value. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
|
||||
</div></div><h3 id="impl-IteratorRandom" class="impl"><code class="in-band">impl<I> <a class="trait" href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html" title="trait rand::seq::IteratorRandom">IteratorRandom</a> for I <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>, </span></code><a href="#impl-IteratorRandom" class="anchor"></a><a class="srclink" href="https://rust-random.github.io/rand/src/rand/seq/mod.rs.html#615" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.choose" class="method hidden"><code>pub fn <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose" class="fnname">choose</a><R>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> R: <a class="trait" href="https://rust-random.github.io/rand/rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="https://rust-random.github.io/rand/src/rand/seq/mod.rs.html#304-305" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Choose one element at random from the iterator. <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose">Read more</a></p>
|
||||
</div><h4 id="method.choose_stable" class="method hidden"><code>pub fn <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose_stable" class="fnname">choose_stable</a><R>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>> <span class="where fmt-newline">where<br> R: <a class="trait" href="https://rust-random.github.io/rand/rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="https://rust-random.github.io/rand/src/rand/seq/mod.rs.html#373-374" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Choose one element at random from the iterator. <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose_stable">Read more</a></p>
|
||||
</div><h4 id="method.choose_multiple_fill" class="method hidden"><code>pub fn <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose_multiple_fill" class="fnname">choose_multiple_fill</a><R>(<br> self, <br> rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R, <br> buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a>Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="https://rust-random.github.io/rand/rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="https://rust-random.github.io/rand/src/rand/seq/mod.rs.html#426-427" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Collects values at random from the iterator into a supplied buffer
|
||||
until that buffer is filled. <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose_multiple_fill">Read more</a></p>
|
||||
</div><h4 id="method.choose_multiple" class="method hidden"><code>pub fn <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose_multiple" class="fnname">choose_multiple</a><R>(<br> self, <br> rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R, <br> amount: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>> <span class="where fmt-newline">where<br> R: <a class="trait" href="https://rust-random.github.io/rand/rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class="srclink" href="https://rust-random.github.io/rand/src/rand/seq/mod.rs.html#466-467" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Collects <code>amount</code> values at random from the iterator into a vector. <a href="https://rust-random.github.io/rand/rand/seq/trait.IteratorRandom.html#method.choose_multiple">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-js="../../../search-index.js"></div>
|
||||
<script src="../../../main.js"></script></body></html>
|
@ -1,12 +1,12 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RowIndexIterator` struct in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, RowIndexIterator"><title>draught::board::iter::RowIndexIterator - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct RowIndexIterator</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.board">board</a><a href="#structfield.row_cursor">row_cursor</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Iterator">Iterator</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-IteratorRandom">IteratorRandom</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a></p><div id="sidebar-vars" data-name="RowIndexIterator" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a>::<wbr><a class="struct" href="">RowIndexIterator</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#3-6" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RowIndexIterator<'a> {
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a>::<wbr><a class="struct" href="">RowIndexIterator</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#4-7" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RowIndexIterator<'a> {
|
||||
board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
||||
row_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.row_cursor" class="structfield small-section-header"><a href="#structfield.row_cursor" class="anchor field"></a><code>row_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#8-15" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a class="srclink" href="../../../src/draught/board/iter.rs.html#9-14" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Iterator" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a></code><a href="#impl-Iterator" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#17-35" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="type">Item</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||||
</div><h4 id="method.next" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></code><a class="srclink" href="../../../src/draught/board/iter.rs.html#21-34" title="goto source code">[src]</a></h4><div class="docblock"><p>Get next item from the iterator</p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.row_cursor" class="structfield small-section-header"><a href="#structfield.row_cursor" class="anchor field"></a><code>row_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#9-16" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a class="srclink" href="../../../src/draught/board/iter.rs.html#10-15" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Iterator" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a></code><a href="#impl-Iterator" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#18-36" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="type">Item</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||||
</div><h4 id="method.next" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>></code><a class="srclink" href="../../../src/draught/board/iter.rs.html#22-35" title="goto source code">[src]</a></h4><div class="docblock"><p>Get next item from the iterator</p>
|
||||
</div><h4 id="method.size_hint" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#205" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the bounds on the remaining length of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint">Read more</a></p>
|
||||
</div><h4 id="method.count" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count" class="fnname">count</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#242-244" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes the iterator, counting the number of iterations and returning it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count">Read more</a></p>
|
||||
</div><h4 id="method.last" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last" class="fnname">last</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#272-274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes the iterator, returning the last element. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last">Read more</a></p>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RowSquareIterator` struct in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, RowSquareIterator"><title>draught::board::iter::RowSquareIterator - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct RowSquareIterator</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.board">board</a><a href="#structfield.index_iter">index_iter</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Iterator">Iterator</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-IntoIterator">IntoIterator</a><a href="#impl-IteratorRandom">IteratorRandom</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a></p><div id="sidebar-vars" data-name="RowSquareIterator" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a>::<wbr><a class="struct" href="">RowSquareIterator</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#37-40" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RowSquareIterator<'a> {
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">draught</a>::<wbr><a href="../index.html">board</a>::<wbr><a href="index.html">iter</a>::<wbr><a class="struct" href="">RowSquareIterator</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../../src/draught/board/iter.rs.html#38-41" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RowSquareIterator<'a> {
|
||||
board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
||||
index_iter: <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.index_iter" class="structfield small-section-header"><a href="#structfield.index_iter" class="anchor field"></a><code>index_iter: <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../draught/board/iter/struct.RowSquareIterator.html" title="struct draught::board::iter::RowSquareIterator">RowSquareIterator</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#42-49" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a class="srclink" href="../../../src/draught/board/iter.rs.html#43-48" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Iterator" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../../../draught/board/iter/struct.RowSquareIterator.html" title="struct draught::board::iter::RowSquareIterator">RowSquareIterator</a><'a></code><a href="#impl-Iterator" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#51-68" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="type">Item</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../draught/board/struct.Square.html" title="struct draught::board::Square">Square</a>></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||||
</div><h4 id="method.next" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../draught/board/struct.Square.html" title="struct draught::board::Square">Square</a>>></code><a class="srclink" href="../../../src/draught/board/iter.rs.html#55-67" title="goto source code">[src]</a></h4><div class="docblock"><p>Get next item from the iterator</p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.board" class="structfield small-section-header"><a href="#structfield.board" class="anchor field"></a><code>board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.index_iter" class="structfield small-section-header"><a href="#structfield.index_iter" class="anchor field"></a><code>index_iter: <a class="struct" href="../../../draught/board/iter/struct.RowIndexIterator.html" title="struct draught::board::iter::RowIndexIterator">RowIndexIterator</a><'a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="../../../draught/board/iter/struct.RowSquareIterator.html" title="struct draught::board::iter::RowSquareIterator">RowSquareIterator</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#43-50" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(board: &'a <a class="struct" href="../../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>) -> Self</code><a class="srclink" href="../../../src/draught/board/iter.rs.html#44-49" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Iterator" class="impl"><code class="in-band">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../../../draught/board/iter/struct.RowSquareIterator.html" title="struct draught::board::iter::RowSquareIterator">RowSquareIterator</a><'a></code><a href="#impl-Iterator" class="anchor"></a><a class="srclink" href="../../../src/draught/board/iter.rs.html#52-69" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Item" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="type">Item</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../draught/board/struct.Square.html" title="struct draught::board::Square">Square</a>></code></h4><div class='docblock'><p>The type of the elements being iterated over.</p>
|
||||
</div><h4 id="method.next" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../draught/board/struct.Square.html" title="struct draught::board::Square">Square</a>>></code><a class="srclink" href="../../../src/draught/board/iter.rs.html#56-68" title="goto source code">[src]</a></h4><div class="docblock"><p>Get next item from the iterator</p>
|
||||
</div><h4 id="method.size_hint" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#205" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the bounds on the remaining length of the iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.size_hint">Read more</a></p>
|
||||
</div><h4 id="method.count" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count" class="fnname">count</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#242-244" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes the iterator, counting the number of iterations and returning it. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.count">Read more</a></p>
|
||||
</div><h4 id="method.last" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last" class="fnname">last</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/iter/traits/iterator.rs.html#272-274" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Consumes the iterator, returning the last element. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#method.last">Read more</a></p>
|
||||
|
@ -1 +1 @@
|
||||
initSidebarItems({"constant":[["STD_HEIGHT","Standard height of a checkers board is 8 squares"],["STD_WIDTH","Standard width of a checkers board is 8 squares"]],"mod":[["enums",""],["iter",""]],"struct":[["Board","Models a single state for a checkers board"],["BrdIdx","Model a rank 2 tensor index to identify a board square by row and column"],["Direction","Model the standard diagonal movements by north west/east etc"],["Piece","Model a game piece by its team and strength (normal or kinged)"],["Square","Model board squares by a state and a possible occupying game piece"]]});
|
||||
initSidebarItems({"constant":[["STD_HEIGHT","Standard height of a checkers board is 8 squares"],["STD_WIDTH","Standard width of a checkers board is 8 squares"]],"mod":[["enums",""],["iter",""]],"struct":[["Board","Single state of a checkers board"],["BrdIdx","Rank 2 tensor index to identify a board square by row and column"],["Direction","Standard diagonal movements given by north west/east etc"],["Piece","Game piece given by its team and strength (normal or kinged)"],["Square","Board squares given by a state and a possible occupying game piece"]]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `__wasm_bindgen_generated_init_game` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, __wasm_bindgen_generated_init_game"><title>draught::__wasm_bindgen_generated_init_game - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="__wasm_bindgen_generated_init_game" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">__wasm_bindgen_generated_init_game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#29" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub extern "C" fn __wasm_bindgen_generated_init_game(<br>) -> <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a> as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">__wasm_bindgen_generated_init_game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#30" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub extern "C" fn __wasm_bindgen_generated_init_game(<br>) -> <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a> as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
<script src="../main.js"></script></body></html>
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `init_game` fn in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, init_game"><title>draught::init_game - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="init_game" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">init_game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#30-36" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn init_game()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">draught</a>::<wbr><a class="fn" href="">init_game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#31-37" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn init_game()</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
<script src="../main.js"></script></body></html>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `game` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>draught::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="game" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game.rs.html#1-13" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#1-142" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Game.html" title="draught::game::Game struct">Game</a></td><td class="docblock-short"><p>Root-level structure for managing the game as a collection of board states</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-js="../../search-index.js"></div>
|
||||
<script src="../../main.js"></script></body></html>
|
@ -1,35 +1,43 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Root-level structure for managing the game as a collection of board states"><meta name="keywords" content="rust, rustlang, rust-lang, Game"><title>draught::game::Game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Game</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.current">current</a><a href="#structfield.previous_boards">previous_boards</a><a href="#structfield.tree">tree</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-From%3CGame%3E">From<Game></a><a href="#impl-FromWasmAbi">FromWasmAbi</a><a href="#impl-IntoWasmAbi">IntoWasmAbi</a><a href="#impl-OptionFromWasmAbi">OptionFromWasmAbi</a><a href="#impl-OptionIntoWasmAbi">OptionIntoWasmAbi</a><a href="#impl-RefFromWasmAbi">RefFromWasmAbi</a><a href="#impl-RefMutFromWasmAbi">RefMutFromWasmAbi</a><a href="#impl-WasmDescribe">WasmDescribe</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">game</a></p><div id="sidebar-vars" data-name="Game" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">game</a>::<wbr><a class="struct" href="">Game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game.rs.html#9-13" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Game {
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Game</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.current">current</a><a href="#structfield.previous_boards">previous_boards</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.current_board">current_board</a><a href="#method.execute_jump">execute_jump</a><a href="#method.execute_move">execute_move</a><a href="#method.make_move">make_move</a><a href="#method.new">new</a><a href="#method.previous_board">previous_board</a><a href="#method.push_new_board">push_new_board</a><a href="#method.set_current">set_current</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-From%3CGame%3E">From<Game></a><a href="#impl-FromWasmAbi">FromWasmAbi</a><a href="#impl-IntoWasmAbi">IntoWasmAbi</a><a href="#impl-OptionFromWasmAbi">OptionFromWasmAbi</a><a href="#impl-OptionIntoWasmAbi">OptionIntoWasmAbi</a><a href="#impl-RefFromWasmAbi">RefFromWasmAbi</a><a href="#impl-RefMutFromWasmAbi">RefMutFromWasmAbi</a><a href="#impl-WasmDescribe">WasmDescribe</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">game</a></p><div id="sidebar-vars" data-name="Game" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">game</a>::<wbr><a class="struct" href="">Game</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/game/mod.rs.html#22-26" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Game {
|
||||
current: <a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>,
|
||||
previous_boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>>,
|
||||
tree: Arena<<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>>,
|
||||
}</pre></div><div class="docblock"><p>Root-level structure for managing the game as a collection of board states</p>
|
||||
</div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.current" class="structfield small-section-header"><a href="#structfield.current" class="anchor field"></a><code>current: <a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.previous_boards" class="structfield small-section-header"><a href="#structfield.previous_boards" class="anchor field"></a><code>previous_boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>></code></span><span id="structfield.tree" class="structfield small-section-header"><a href="#structfield.tree" class="anchor field"></a><code>tree: Arena<<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-From%3CGame%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CGame%3E" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>) -> Self</code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.current" class="structfield small-section-header"><a href="#structfield.current" class="anchor field"></a><code>current: <a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code></span><span id="structfield.previous_boards" class="structfield small-section-header"><a href="#structfield.previous_boards" class="anchor field"></a><code>previous_boards: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#28-38" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.previous_board" class="method"><code>pub fn <a href="#method.previous_board" class="fnname">previous_board</a>(&self, turn: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> &<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#30-32" title="goto source code">[src]</a></h4><div class="docblock"><p>Get a read-only copy of a previous turn’s board</p>
|
||||
</div><h4 id="method.current_board" class="method"><code>pub fn <a href="#method.current_board" class="fnname">current_board</a>(&self) -> &<a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#35-37" title="goto source code">[src]</a></h4><div class="docblock"><p>Set current board to given</p>
|
||||
</div></div><h3 id="impl-1" class="impl"><code class="in-band">impl <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-1" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#41-136" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.make_move" class="method"><code>pub fn <a href="#method.make_move" class="fnname">make_move</a>(&mut self, from: <a class="struct" href="../../draught/board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../../draught/board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a class="srclink" href="../../src/draught/game/mod.rs.html#43-62" title="goto source code">[src]</a></h4><div class="docblock"><p>Attempt to make a move given a source and destination index</p>
|
||||
</div><h4 id="method.execute_move" class="method"><code>pub fn <a href="#method.execute_move" class="fnname">execute_move</a>(&mut self, from: <a class="struct" href="../../draught/board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../../draught/board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a class="srclink" href="../../src/draught/game/mod.rs.html#65-85" title="goto source code">[src]</a></h4><div class="docblock"><p>Update board state with given move and push new board into current state</p>
|
||||
</div><h4 id="method.execute_jump" class="method"><code>pub fn <a href="#method.execute_jump" class="fnname">execute_jump</a>(&mut self, from: <a class="struct" href="../../draught/board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>, to: <a class="struct" href="../../draught/board/struct.BrdIdx.html" title="struct draught::board::BrdIdx">BrdIdx</a>)</code><a class="srclink" href="../../src/draught/game/mod.rs.html#88-114" title="goto source code">[src]</a></h4><div class="docblock"><p>Update board state with given jump move and push new board into current state</p>
|
||||
</div><h4 id="method.push_new_board" class="method"><code>pub fn <a href="#method.push_new_board" class="fnname">push_new_board</a>(&mut self, board: <a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>)</code><a class="srclink" href="../../src/draught/game/mod.rs.html#117-120" title="goto source code">[src]</a></h4><div class="docblock"><p>Push current board into the previous turns and set given board to current</p>
|
||||
</div><h4 id="method.set_current" class="method"><code>pub fn <a href="#method.set_current" class="fnname">set_current</a>(&mut self, board: <a class="struct" href="../../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>)</code><a class="srclink" href="../../src/draught/game/mod.rs.html#123-125" title="goto source code">[src]</a></h4><div class="docblock"><p>Set current board to given</p>
|
||||
</div><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> piece_rows: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> first_turn: <a class="enum" href="../../draught/board/enums/enum.Team.html" title="enum draught::board::enums::Team">Team</a><br>) -> <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#128-135" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#21" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#21" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#138-142" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#139-141" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CGame%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CGame%3E" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>) -> Self</code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
||||
</div><h4 id="method.from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi" class="fnname">from_abi</a>(js: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-IntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-IntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-2" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type that this converts into when crossing the ABI
|
||||
</div><h4 id="method.from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi" class="fnname">from_abi</a>(js: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-IntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-IntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-2" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type that this converts into when crossing the ABI
|
||||
boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
||||
</div><h4 id="method.into_abi" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi" class="fnname">into_abi</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Convert <code>self</code> into <code>Self::Abi</code> so that it can be sent across the wasm
|
||||
</div><h4 id="method.into_abi" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi" class="fnname">into_abi</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Convert <code>self</code> into <code>Self::Abi</code> so that it can be sent across the wasm
|
||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-OptionFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionFromWasmAbi">OptionFromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.is_none" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none" class="fnname">is_none</a>(abi: &Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::FromWasmAbi::Abi">Abi</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Tests whether the argument is a “none” instance. If so it will be
|
||||
</div></div><h3 id="impl-OptionFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionFromWasmAbi">OptionFromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.is_none" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none" class="fnname">is_none</a>(abi: &Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::FromWasmAbi::Abi">Abi</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Tests whether the argument is a “none” instance. If so it will be
|
||||
deserialized as <code>None</code>, and otherwise it will be passed to
|
||||
<code>FromWasmAbi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none">Read more</a></p>
|
||||
</div></div><h3 id="impl-OptionIntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionIntoWasmAbi">OptionIntoWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionIntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.none" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none" class="fnname">none</a>() -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns an ABI instance indicating “none”, which JS will interpret as
|
||||
</div></div><h3 id="impl-OptionIntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionIntoWasmAbi">OptionIntoWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-OptionIntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.none" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none" class="fnname">none</a>() -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns an ABI instance indicating “none”, which JS will interpret as
|
||||
the <code>None</code> branch of this option. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none">Read more</a></p>
|
||||
</div></div><h3 id="impl-RefFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefFromWasmAbi">RefFromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type references to <code>Self</code> are recovered from.</p>
|
||||
</div></div><h3 id="impl-RefFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefFromWasmAbi">RefFromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type references to <code>Self</code> are recovered from.</p>
|
||||
</div><h4 id="associatedtype.Anchor" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" class="type">Anchor</a> = <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/__rt/struct.Ref.html" title="struct wasm_bindgen::__rt::Ref">Ref</a><'static, <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>></code></h4><div class='docblock'><p>The type that holds the reference to <code>Self</code> for the duration of the
|
||||
invocation of the function that has an <code>&Self</code> parameter. This is
|
||||
required to ensure that the lifetimes don’t persist beyond one function
|
||||
call, and so that they remain anonymous. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor">Read more</a></p>
|
||||
</div><h4 id="method.ref_from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi" class="fnname">ref_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Anchor">Anchor</a></code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self::Anchor</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-RefMutFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefMutFromWasmAbi">RefMutFromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefMutFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-3" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Abi</code></p>
|
||||
</div><h4 id="method.ref_from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi" class="fnname">ref_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Anchor">Anchor</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self::Anchor</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-RefMutFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefMutFromWasmAbi">RefMutFromWasmAbi</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefMutFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-3" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Abi</code></p>
|
||||
</div><h4 id="associatedtype.Anchor-1" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" class="type">Anchor</a> = <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/__rt/struct.RefMut.html" title="struct wasm_bindgen::__rt::RefMut">RefMut</a><'static, <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>></code></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Anchor</code></p>
|
||||
</div><h4 id="method.ref_mut_from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#tymethod.ref_mut_from_abi" class="fnname">ref_mut_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Anchor">Anchor</a></code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>RefFromWasmAbi::ref_from_abi</code></p>
|
||||
</div></div><h3 id="impl-WasmDescribe" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html" title="trait wasm_bindgen::describe::WasmDescribe">WasmDescribe</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-WasmDescribe" class="anchor"></a><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.describe" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html#tymethod.describe" class="fnname">describe</a>()</code><a class="srclink" href="../../src/draught/game.rs.html#8" title="goto source code">[src]</a></h4></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><h4 id="method.ref_mut_from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#tymethod.ref_mut_from_abi" class="fnname">ref_mut_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Anchor">Anchor</a></code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>RefFromWasmAbi::ref_from_abi</code></p>
|
||||
</div></div><h3 id="impl-WasmDescribe" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html" title="trait wasm_bindgen::describe::WasmDescribe">WasmDescribe</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-WasmDescribe" class="anchor"></a><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.describe" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html#tymethod.describe" class="fnname">describe</a>()</code><a class="srclink" href="../../src/draught/game/mod.rs.html#20" title="goto source code">[src]</a></h4></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
@ -37,6 +45,7 @@ call, and so that they remain anonymous. <a href="https://docs.rs/wasm-bindgen/0
|
||||
</div></div><h3 id="impl-ReturnWasmAbi" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a>, </span></code><a href="#impl-ReturnWasmAbi" class="anchor"></a><a class="srclink" href="https://docs.rs/wasm-bindgen/0.2/src/wasm_bindgen/convert/traits.rs.html#122-129" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-4" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <T as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code></h4><div class='docblock'><p>Same as <code>IntoWasmAbi::Abi</code></p>
|
||||
</div><h4 id="method.return_abi" class="method hidden"><code>pub fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#tymethod.return_abi" class="fnname">return_abi</a>(self) -> <T as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></code><a class="srclink" href="https://docs.rs/wasm-bindgen/0.2/src/wasm_bindgen/convert/traits.rs.html#126" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>IntoWasmAbi::into_abi</code>, except that it may throw and never
|
||||
return in the case of <code>Err</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#tymethod.return_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-ToString" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-ToString" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2261-2274" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.to_string" class="method hidden"><code>pub default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2267" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Draught"><meta name="keywords" content="rust, rustlang, rust-lang, draught"><title>draught - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate draught</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all draught's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="draught" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">draught</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#1-36" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Draught</p>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">draught</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#1-37" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Draught</p>
|
||||
<p>An implementation of checkers/draughts in Rust WebAssembly with a minimax AI player</p>
|
||||
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr><td><code>pub use board::<a class="struct" href="../draught/board/struct.Board.html" title="struct draught::board::Board">Board</a>;</code></td></tr><tr><td><code>pub use game::<a class="struct" href="../draught/game/struct.Game.html" title="struct draught::game::Game">Game</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<table><tr class="module-item"><td><a class="mod" href="board/index.html" title="draught::board mod">board</a></td><td class="docblock-short"><p>Board module for components related to the checkers board and game structure</p>
|
||||
</td></tr><tr class="module-item"><td><a class="mod" href="game/index.html" title="draught::game mod">game</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="utils/index.html" title="draught::utils mod">utils</a></td><td class="docblock-short"></td></tr></table><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2>
|
||||
</td></tr><tr class="module-item"><td><a class="mod" href="game/index.html" title="draught::game mod">game</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="player/index.html" title="draught::player mod">player</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="utils/index.html" title="draught::utils mod">utils</a></td><td class="docblock-short"></td></tr></table><h2 id="macros" class="section-header"><a href="#macros">Macros</a></h2>
|
||||
<table><tr class="module-item"><td><a class="macro" href="macro.log.html" title="draught::log macro">log</a></td><td class="docblock-short"><p>Wrap the <a href="https://docs.rs/web-sys/0.3/web_sys/index.html" title="web_sys"><code>web_sys</code></a> access to the browser console in a macro for easy logging</p>
|
||||
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.__wasm_bindgen_generated_init_game.html" title="draught::__wasm_bindgen_generated_init_game fn">__wasm_bindgen_generated_init_game</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.init_game.html" title="draught::init_game fn">init_game</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="draught" data-search-js="../search-index.js"></div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Wrap the [`web_sys`] access to the browser console in a macro for easy logging"><meta name="keywords" content="rust, rustlang, rust-lang, log"><title>draught::log - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc macro"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../draught/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">draught</a></p><div id="sidebar-vars" data-name="log" data-ty="macro" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">draught</a>::<wbr><a class="macro" href="">log</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#23-27" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Macro <a href="index.html">draught</a>::<wbr><a class="macro" href="">log</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/draught/lib.rs.html#24-28" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><div class="example-wrap"><pre class="rust macro">
|
||||
<span class="macro">macro_rules</span><span class="macro">!</span> <span class="ident">log</span> {
|
||||
( $( <span class="macro-nonterminal">$</span><span class="macro-nonterminal">t</span>:<span class="ident">tt</span> )<span class="op">*</span> ) <span class="op">=</span><span class="op">></span> { ... };
|
||||
}</pre></div>
|
||||
|
6
doc/draught/player/index.html
Normal file
6
doc/draught/player/index.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `player` mod in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, player"><title>draught::player - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module player</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">draught</a></p><div id="sidebar-vars" data-name="player" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">draught</a>::<wbr><a class="mod" href="">player</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/player.rs.html#1-8" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<table><tr class="module-item"><td><a class="struct" href="struct.Player.html" title="draught::player::Player struct">Player</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-js="../../search-index.js"></div>
|
||||
<script src="../../main.js"></script></body></html>
|
1
doc/draught/player/sidebar-items.js
Normal file
1
doc/draught/player/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
initSidebarItems({"struct":[["Player",""]]});
|
48
doc/draught/player/struct.Player.html
Normal file
48
doc/draught/player/struct.Player.html
Normal file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Player` struct in crate `draught`."><meta name="keywords" content="rust, rustlang, rust-lang, Player"><title>draught::player::Player - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Player</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.score">score</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CPlayer%3E">From<Player></a><a href="#impl-FromWasmAbi">FromWasmAbi</a><a href="#impl-IntoWasmAbi">IntoWasmAbi</a><a href="#impl-OptionFromWasmAbi">OptionFromWasmAbi</a><a href="#impl-OptionIntoWasmAbi">OptionIntoWasmAbi</a><a href="#impl-RefFromWasmAbi">RefFromWasmAbi</a><a href="#impl-RefMutFromWasmAbi">RefMutFromWasmAbi</a><a href="#impl-WasmDescribe">WasmDescribe</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ReturnWasmAbi">ReturnWasmAbi</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class="location"><a href="../index.html">draught</a>::<wbr><a href="index.html">player</a></p><div id="sidebar-vars" data-name="Player" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">draught</a>::<wbr><a href="index.html">player</a>::<wbr><a class="struct" href="">Player</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/draught/player.rs.html#6-8" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Player {
|
||||
score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.score" class="structfield small-section-header"><a href="#structfield.score" class="anchor field"></a><code>score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#5" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a class="srclink" href="../../src/draught/player.rs.html#5" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CPlayer%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a>> for <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html" title="struct wasm_bindgen::JsValue">JsValue</a></code><a href="#impl-From%3CPlayer%3E" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a>) -> Self</code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-FromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html" title="trait wasm_bindgen::convert::traits::FromWasmAbi">FromWasmAbi</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-FromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-1" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type that this converts from when coming back out from the
|
||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
||||
</div><h4 id="method.from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi" class="fnname">from_abi</a>(js: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#tymethod.from_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-IntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-IntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-2" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type that this converts into when crossing the ABI
|
||||
boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi">Read more</a></p>
|
||||
</div><h4 id="method.into_abi" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi" class="fnname">into_abi</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Convert <code>self</code> into <code>Self::Abi</code> so that it can be sent across the wasm
|
||||
ABI boundary. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#tymethod.into_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-OptionFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionFromWasmAbi">OptionFromWasmAbi</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-OptionFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.is_none" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none" class="fnname">is_none</a>(abi: &Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::FromWasmAbi::Abi">Abi</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Tests whether the argument is a “none” instance. If so it will be
|
||||
deserialized as <code>None</code>, and otherwise it will be passed to
|
||||
<code>FromWasmAbi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html#tymethod.is_none">Read more</a></p>
|
||||
</div></div><h3 id="impl-OptionIntoWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::OptionIntoWasmAbi">OptionIntoWasmAbi</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-OptionIntoWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.none" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none" class="fnname">none</a>() -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns an ABI instance indicating “none”, which JS will interpret as
|
||||
the <code>None</code> branch of this option. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html#tymethod.none">Read more</a></p>
|
||||
</div></div><h3 id="impl-RefFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefFromWasmAbi">RefFromWasmAbi</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-RefFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>The wasm ABI type references to <code>Self</code> are recovered from.</p>
|
||||
</div><h4 id="associatedtype.Anchor" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" class="type">Anchor</a> = <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/__rt/struct.Ref.html" title="struct wasm_bindgen::__rt::Ref">Ref</a><'static, <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a>></code></h4><div class='docblock'><p>The type that holds the reference to <code>Self</code> for the duration of the
|
||||
invocation of the function that has an <code>&Self</code> parameter. This is
|
||||
required to ensure that the lifetimes don’t persist beyond one function
|
||||
call, and so that they remain anonymous. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor">Read more</a></p>
|
||||
</div><h4 id="method.ref_from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi" class="fnname">ref_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefFromWasmAbi::Anchor">Anchor</a></code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Recover a <code>Self::Anchor</code> from <code>Self::Abi</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html#tymethod.ref_from_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-RefMutFromWasmAbi" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html" title="trait wasm_bindgen::convert::traits::RefMutFromWasmAbi">RefMutFromWasmAbi</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-RefMutFromWasmAbi" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-3" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Abi</code></p>
|
||||
</div><h4 id="associatedtype.Anchor-1" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" class="type">Anchor</a> = <a class="struct" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/__rt/struct.RefMut.html" title="struct wasm_bindgen::__rt::RefMut">RefMut</a><'static, <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a>></code></h4><div class='docblock'><p>Same as <code>RefFromWasmAbi::Anchor</code></p>
|
||||
</div><h4 id="method.ref_mut_from_abi" class="method hidden"><code>unsafe fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#tymethod.ref_mut_from_abi" class="fnname">ref_mut_from_abi</a>(js: Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Abi">Abi</a>) -> Self::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html#associatedtype.Anchor" title="type wasm_bindgen::convert::traits::RefMutFromWasmAbi::Anchor">Anchor</a></code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>RefFromWasmAbi::ref_from_abi</code></p>
|
||||
</div></div><h3 id="impl-WasmDescribe" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html" title="trait wasm_bindgen::describe::WasmDescribe">WasmDescribe</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-WasmDescribe" class="anchor"></a><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.describe" class="method hidden"><code>fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html#tymethod.describe" class="fnname">describe</a>()</code><a class="srclink" href="../../src/draught/player.rs.html#4" title="goto source code">[src]</a></h4></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../draught/player/struct.Player.html" title="struct draught::player::Player">Player</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#533-540" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#537" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-ReturnWasmAbi" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a>, </span></code><a href="#impl-ReturnWasmAbi" class="anchor"></a><a class="srclink" href="https://docs.rs/wasm-bindgen/0.2/src/wasm_bindgen/convert/traits.rs.html#122-129" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Abi-4" class="type"><code>type <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" class="type">Abi</a> = <T as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html" title="trait wasm_bindgen::convert::traits::IntoWasmAbi">IntoWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::IntoWasmAbi::Abi">Abi</a></code></h4><div class='docblock'><p>Same as <code>IntoWasmAbi::Abi</code></p>
|
||||
</div><h4 id="method.return_abi" class="method hidden"><code>pub fn <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#tymethod.return_abi" class="fnname">return_abi</a>(self) -> <T as <a class="trait" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html" title="trait wasm_bindgen::convert::traits::ReturnWasmAbi">ReturnWasmAbi</a>>::<a class="type" href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#associatedtype.Abi" title="type wasm_bindgen::convert::traits::ReturnWasmAbi::Abi">Abi</a></code><a class="srclink" href="https://docs.rs/wasm-bindgen/0.2/src/wasm_bindgen/convert/traits.rs.html#126" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Same as <code>IntoWasmAbi::into_abi</code>, except that it may throw and never
|
||||
return in the case of <code>Err</code>. <a href="https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.ReturnWasmAbi.html#tymethod.return_abi">Read more</a></p>
|
||||
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-93" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||||
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#86" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||||
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#90" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-590" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-576" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#573" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-VZip%3CV%3E" class="impl"><code class="in-band">impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href="#impl-VZip%3CV%3E" class="anchor"></a></h3><div class="impl-items"><h4 id="method.vzip" class="method hidden"><code>pub fn <a href="#method.vzip" class="fnname">vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-js="../../search-index.js"></div>
|
||||
<script src="../../main.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["__wasm_bindgen_generated_init_game",""],["init_game",""]],"macro":[["log","Wrap the [`web_sys`] access to the browser console in a macro for easy logging"]],"mod":[["board","Board module for components related to the checkers board and game structure"],["game",""],["utils",""]]});
|
||||
initSidebarItems({"fn":[["__wasm_bindgen_generated_init_game",""],["init_game",""]],"macro":[["log","Wrap the [`web_sys`] access to the browser console in a macro for easy logging"]],"mod":[["board","Board module for components related to the checkers board and game structure"],["game",""],["player",""],["utils",""]]});
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a><T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a><T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>> for <a class=\"struct\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/struct.JsValue.html\" title=\"struct wasm_bindgen::JsValue\">JsValue</a>","synthetic":false,"types":["wasm_bindgen::JsValue"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a><T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Direction.html\" title=\"struct draught::board::Direction\">Direction</a><T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"draught/board/iter/struct.RowIndexIterator.html\" title=\"struct draught::board::iter::RowIndexIterator\">RowIndexIterator</a><'a>","synthetic":false,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"draught/board/iter/struct.RowSquareIterator.html\" title=\"struct draught::board::iter::RowSquareIterator\">RowSquareIterator</a><'a>","synthetic":false,"types":["draught::board::iter::RowSquareIterator"]}];
|
||||
implementors["draught"] = [{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"draught/board/iter/struct.RowIndexIterator.html\" title=\"struct draught::board::iter::RowIndexIterator\">RowIndexIterator</a><'a>","synthetic":false,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"draught/board/iter/struct.RowSquareIterator.html\" title=\"struct draught::board::iter::RowSquareIterator\">RowSquareIterator</a><'a>","synthetic":false,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"draught/board/iter/struct.PieceIterator.html\" title=\"struct draught::board::iter::PieceIterator\">PieceIterator</a><'a>","synthetic":false,"types":["draught::board::iter::PieceIterator"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.FromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::FromWasmAbi\">FromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.IntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::IntoWasmAbi\">IntoWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionFromWasmAbi\">OptionFromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.OptionIntoWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::OptionIntoWasmAbi\">OptionIntoWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefFromWasmAbi\">RefFromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/convert/traits/trait.RefMutFromWasmAbi.html\" title=\"trait wasm_bindgen::convert::traits::RefMutFromWasmAbi\">RefMutFromWasmAbi</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
@ -1,3 +1,3 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]}];
|
||||
implementors["draught"] = [{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Team.html\" title=\"enum draught::board::enums::Team\">Team</a>","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Strength.html\" title=\"enum draught::board::enums::Strength\">Strength</a>","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.SquareState.html\" title=\"enum draught::board::enums::SquareState\">SquareState</a>","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"enum\" href=\"draught/board/enums/enum.Moveable.html\" title=\"enum draught::board::enums::Moveable\">Moveable</a>","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Piece.html\" title=\"struct draught::board::Piece\">Piece</a>","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Square.html\" title=\"struct draught::board::Square\">Square</a>","synthetic":false,"types":["draught::board::Square"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.BrdIdx.html\" title=\"struct draught::board::BrdIdx\">BrdIdx</a>","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/board/struct.Board.html\" title=\"struct draught::board::Board\">Board</a>","synthetic":false,"types":["draught::board::Board"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/game/struct.Game.html\" title=\"struct draught::game::Game\">Game</a>","synthetic":false,"types":["draught::game::Game"]},{"text":"impl <a class=\"trait\" href=\"https://docs.rs/wasm-bindgen/0.2/wasm_bindgen/describe/trait.WasmDescribe.html\" title=\"trait wasm_bindgen::describe::WasmDescribe\">WasmDescribe</a> for <a class=\"struct\" href=\"draught/player/struct.Player.html\" title=\"struct draught::player::Player\">Player</a>","synthetic":false,"types":["draught::player::Player"]}];
|
||||
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
File diff suppressed because one or more lines are too long
@ -1,3 +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"]};
|
||||
sourcesIndex["draught"] = {"name":"","dirs":[{"name":"board","files":["enums.rs","iter.rs","mod.rs"]},{"name":"game","files":["mod.rs"]}],"files":["lib.rs","player.rs","utils.rs"]};
|
||||
createSourceSidebar();
|
||||
|
@ -107,8 +107,97 @@
|
||||
<span id="104">104</span>
|
||||
<span id="105">105</span>
|
||||
<span id="106">106</span>
|
||||
<span id="107">107</span>
|
||||
<span id="108">108</span>
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
<span id="117">117</span>
|
||||
<span id="118">118</span>
|
||||
<span id="119">119</span>
|
||||
<span id="120">120</span>
|
||||
<span id="121">121</span>
|
||||
<span id="122">122</span>
|
||||
<span id="123">123</span>
|
||||
<span id="124">124</span>
|
||||
<span id="125">125</span>
|
||||
<span id="126">126</span>
|
||||
<span id="127">127</span>
|
||||
<span id="128">128</span>
|
||||
<span id="129">129</span>
|
||||
<span id="130">130</span>
|
||||
<span id="131">131</span>
|
||||
<span id="132">132</span>
|
||||
<span id="133">133</span>
|
||||
<span id="134">134</span>
|
||||
<span id="135">135</span>
|
||||
<span id="136">136</span>
|
||||
<span id="137">137</span>
|
||||
<span id="138">138</span>
|
||||
<span id="139">139</span>
|
||||
<span id="140">140</span>
|
||||
<span id="141">141</span>
|
||||
<span id="142">142</span>
|
||||
<span id="143">143</span>
|
||||
<span id="144">144</span>
|
||||
<span id="145">145</span>
|
||||
<span id="146">146</span>
|
||||
<span id="147">147</span>
|
||||
<span id="148">148</span>
|
||||
<span id="149">149</span>
|
||||
<span id="150">150</span>
|
||||
<span id="151">151</span>
|
||||
<span id="152">152</span>
|
||||
<span id="153">153</span>
|
||||
<span id="154">154</span>
|
||||
<span id="155">155</span>
|
||||
<span id="156">156</span>
|
||||
<span id="157">157</span>
|
||||
<span id="158">158</span>
|
||||
<span id="159">159</span>
|
||||
<span id="160">160</span>
|
||||
<span id="161">161</span>
|
||||
<span id="162">162</span>
|
||||
<span id="163">163</span>
|
||||
<span id="164">164</span>
|
||||
<span id="165">165</span>
|
||||
<span id="166">166</span>
|
||||
<span id="167">167</span>
|
||||
<span id="168">168</span>
|
||||
<span id="169">169</span>
|
||||
<span id="170">170</span>
|
||||
<span id="171">171</span>
|
||||
<span id="172">172</span>
|
||||
<span id="173">173</span>
|
||||
<span id="174">174</span>
|
||||
<span id="175">175</span>
|
||||
<span id="176">176</span>
|
||||
<span id="177">177</span>
|
||||
<span id="178">178</span>
|
||||
<span id="179">179</span>
|
||||
<span id="180">180</span>
|
||||
<span id="181">181</span>
|
||||
<span id="182">182</span>
|
||||
<span id="183">183</span>
|
||||
<span id="184">184</span>
|
||||
<span id="185">185</span>
|
||||
<span id="186">186</span>
|
||||
<span id="187">187</span>
|
||||
<span id="188">188</span>
|
||||
<span id="189">189</span>
|
||||
<span id="190">190</span>
|
||||
<span id="191">191</span>
|
||||
<span id="192">192</span>
|
||||
<span id="193">193</span>
|
||||
<span id="194">194</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::{<span class="ident">Board</span>, <span class="ident">Square</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::{<span class="ident">Board</span>, <span class="ident">Piece</span>, <span class="ident">Square</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::<span class="ident">enums</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RowIndexIterator</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="ident">board</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">Board</span>,
|
||||
@ -177,17 +266,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">PieceIterator</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="ident">board</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">Board</span>,
|
||||
<span class="ident">index_cursor</span>: <span class="ident">usize</span>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">PieceIterator</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">board</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">Board</span>) <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="self">Self</span> {
|
||||
<span class="ident">board</span>,
|
||||
<span class="ident">index_cursor</span>: <span class="number">0</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">Iterator</span> <span class="kw">for</span> <span class="ident">PieceIterator</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> {
|
||||
<span class="kw">type</span> <span class="ident">Item</span> <span class="op">=</span> (<span class="ident">usize</span>, <span class="ident">Square</span>);
|
||||
|
||||
<span class="doccomment">/// Get next item from the iterator</span>
|
||||
<span class="kw">fn</span> <span class="ident">next</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">usize</span>, <span class="ident">Square</span>)<span class="op">></span> {
|
||||
|
||||
<span class="kw">while</span> <span class="self">self</span>.<span class="ident">index_cursor</span> <span class="op"><</span> <span class="self">self</span>.<span class="ident">board</span>.<span class="ident">num_cells</span>() <span class="op">-</span> <span class="number">1</span> {
|
||||
<span class="self">self</span>.<span class="ident">index_cursor</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">board</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">index_cursor</span>).<span class="ident">state</span> {
|
||||
<span class="ident">SquareState</span>::<span class="ident">Empty</span> <span class="op">|</span> <span class="ident">SquareState</span>::<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="kw">continue</span>,
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="prelude-val">Some</span>((<span class="self">self</span>.<span class="ident">index_cursor</span>, <span class="self">self</span>.<span class="ident">board</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">index_cursor</span>))),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
|
||||
<span class="kw">mod</span> <span class="ident">tests</span> {
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span> {
|
||||
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::<span class="ident">enums</span>::<span class="ident">SquareState</span>;
|
||||
<span class="kw">use</span> <span class="ident">wasm_bindgen_test</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">log</span>;
|
||||
|
||||
<span class="macro">wasm_bindgen_test_configure</span><span class="macro">!</span>(<span class="ident">run_in_browser</span>);
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen_test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">index_iterator</span>() {
|
||||
<span class="kw">let</span> <span class="ident">board</span> <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">new</span>(<span class="number">2</span>, <span class="number">2</span>);
|
||||
<span class="kw">let</span> <span class="ident">board</span> <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">new</span>(<span class="number">2</span>, <span class="number">2</span>, <span class="ident">Team</span>::<span class="ident">Black</span>);
|
||||
<span class="kw">let</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">RowIndexIterator</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">board</span>);
|
||||
<span class="kw">let</span> <span class="ident">collected</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span><span class="op">></span> <span class="op">=</span> <span class="ident">iter</span>.<span class="ident">collect</span>();
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
@ -198,7 +321,7 @@
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen_test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">square_iterator</span>() {
|
||||
<span class="kw">let</span> <span class="ident">board</span> <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">new</span>(<span class="number">2</span>, <span class="number">2</span>);
|
||||
<span class="kw">let</span> <span class="ident">board</span> <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">new</span>(<span class="number">2</span>, <span class="number">2</span>, <span class="ident">Team</span>::<span class="ident">Black</span>);
|
||||
<span class="kw">let</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">RowSquareIterator</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">board</span>);
|
||||
<span class="kw">let</span> <span class="ident">collected</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">Square</span><span class="op">></span><span class="op">></span> <span class="op">=</span> <span class="ident">iter</span>.<span class="ident">collect</span>();
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="macro">vec</span><span class="macro">!</span>[
|
||||
@ -213,6 +336,59 @@
|
||||
], <span class="ident">collected</span>);
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen_test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">piece_iterator_one_piece</span>() {
|
||||
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="number">2</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">board</span> <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">new</span>(<span class="number">4</span>, <span class="number">4</span>, <span class="ident">Team</span>::<span class="ident">Black</span>);
|
||||
<span class="ident">board</span>.<span class="ident">set_cell</span>(<span class="ident">idx</span>, <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span>,
|
||||
<span class="prelude-val">Some</span>(
|
||||
<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">Team</span>::<span class="ident">White</span>, <span class="ident">Strength</span>::<span class="ident">Man</span>)
|
||||
)
|
||||
));
|
||||
|
||||
<span class="kw">let</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">PieceIterator</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">board</span>);
|
||||
<span class="kw">let</span> <span class="ident">collected</span>: <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">usize</span>, <span class="ident">Square</span>)<span class="op">></span> <span class="op">=</span> <span class="ident">iter</span>.<span class="ident">collect</span>();
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>.<span class="ident">len</span>(), <span class="number">1</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>[<span class="number">0</span>], (<span class="ident">idx</span>, <span class="ident">board</span>.<span class="ident">cell</span>(<span class="ident">idx</span>)));
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen_test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">piece_iterator_multiple_pieces</span>() {
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">board</span> <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">new</span>(<span class="number">4</span>, <span class="number">4</span>, <span class="ident">Team</span>::<span class="ident">Black</span>);
|
||||
<span class="ident">board</span>.<span class="ident">set_cell</span>(<span class="number">2</span>, <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span>,
|
||||
<span class="prelude-val">Some</span>(
|
||||
<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">Team</span>::<span class="ident">White</span>, <span class="ident">Strength</span>::<span class="ident">Man</span>)
|
||||
)
|
||||
));
|
||||
|
||||
<span class="ident">board</span>.<span class="ident">set_cell</span>(<span class="number">4</span>, <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span>,
|
||||
<span class="prelude-val">Some</span>(
|
||||
<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">Team</span>::<span class="ident">Black</span>, <span class="ident">Strength</span>::<span class="ident">Man</span>)
|
||||
)
|
||||
));
|
||||
|
||||
<span class="ident">board</span>.<span class="ident">set_cell</span>(<span class="number">5</span>, <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span>,
|
||||
<span class="prelude-val">Some</span>(
|
||||
<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">Team</span>::<span class="ident">White</span>, <span class="ident">Strength</span>::<span class="ident">King</span>)
|
||||
)
|
||||
));
|
||||
|
||||
<span class="kw">let</span> <span class="ident">iter</span> <span class="op">=</span> <span class="ident">PieceIterator</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">board</span>);
|
||||
<span class="kw">let</span> <span class="ident">collected</span>: <span class="ident">Vec</span><span class="op"><</span>(<span class="ident">usize</span>, <span class="ident">Square</span>)<span class="op">></span> <span class="op">=</span> <span class="ident">iter</span>.<span class="ident">collect</span>();
|
||||
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>.<span class="ident">len</span>(), <span class="number">3</span>);
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>[<span class="number">0</span>], (<span class="number">2</span>, <span class="ident">board</span>.<span class="ident">cell</span>(<span class="number">2</span>)));
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>[<span class="number">1</span>], (<span class="number">4</span>, <span class="ident">board</span>.<span class="ident">cell</span>(<span class="number">4</span>)));
|
||||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">collected</span>[<span class="number">2</span>], (<span class="number">5</span>, <span class="ident">board</span>.<span class="ident">cell</span>(<span class="number">5</span>)));
|
||||
}
|
||||
|
||||
}</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-js="../../../search-index.js"></div>
|
||||
<script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script></body></html>
|
@ -631,6 +631,116 @@
|
||||
<span id="628">628</span>
|
||||
<span id="629">629</span>
|
||||
<span id="630">630</span>
|
||||
<span id="631">631</span>
|
||||
<span id="632">632</span>
|
||||
<span id="633">633</span>
|
||||
<span id="634">634</span>
|
||||
<span id="635">635</span>
|
||||
<span id="636">636</span>
|
||||
<span id="637">637</span>
|
||||
<span id="638">638</span>
|
||||
<span id="639">639</span>
|
||||
<span id="640">640</span>
|
||||
<span id="641">641</span>
|
||||
<span id="642">642</span>
|
||||
<span id="643">643</span>
|
||||
<span id="644">644</span>
|
||||
<span id="645">645</span>
|
||||
<span id="646">646</span>
|
||||
<span id="647">647</span>
|
||||
<span id="648">648</span>
|
||||
<span id="649">649</span>
|
||||
<span id="650">650</span>
|
||||
<span id="651">651</span>
|
||||
<span id="652">652</span>
|
||||
<span id="653">653</span>
|
||||
<span id="654">654</span>
|
||||
<span id="655">655</span>
|
||||
<span id="656">656</span>
|
||||
<span id="657">657</span>
|
||||
<span id="658">658</span>
|
||||
<span id="659">659</span>
|
||||
<span id="660">660</span>
|
||||
<span id="661">661</span>
|
||||
<span id="662">662</span>
|
||||
<span id="663">663</span>
|
||||
<span id="664">664</span>
|
||||
<span id="665">665</span>
|
||||
<span id="666">666</span>
|
||||
<span id="667">667</span>
|
||||
<span id="668">668</span>
|
||||
<span id="669">669</span>
|
||||
<span id="670">670</span>
|
||||
<span id="671">671</span>
|
||||
<span id="672">672</span>
|
||||
<span id="673">673</span>
|
||||
<span id="674">674</span>
|
||||
<span id="675">675</span>
|
||||
<span id="676">676</span>
|
||||
<span id="677">677</span>
|
||||
<span id="678">678</span>
|
||||
<span id="679">679</span>
|
||||
<span id="680">680</span>
|
||||
<span id="681">681</span>
|
||||
<span id="682">682</span>
|
||||
<span id="683">683</span>
|
||||
<span id="684">684</span>
|
||||
<span id="685">685</span>
|
||||
<span id="686">686</span>
|
||||
<span id="687">687</span>
|
||||
<span id="688">688</span>
|
||||
<span id="689">689</span>
|
||||
<span id="690">690</span>
|
||||
<span id="691">691</span>
|
||||
<span id="692">692</span>
|
||||
<span id="693">693</span>
|
||||
<span id="694">694</span>
|
||||
<span id="695">695</span>
|
||||
<span id="696">696</span>
|
||||
<span id="697">697</span>
|
||||
<span id="698">698</span>
|
||||
<span id="699">699</span>
|
||||
<span id="700">700</span>
|
||||
<span id="701">701</span>
|
||||
<span id="702">702</span>
|
||||
<span id="703">703</span>
|
||||
<span id="704">704</span>
|
||||
<span id="705">705</span>
|
||||
<span id="706">706</span>
|
||||
<span id="707">707</span>
|
||||
<span id="708">708</span>
|
||||
<span id="709">709</span>
|
||||
<span id="710">710</span>
|
||||
<span id="711">711</span>
|
||||
<span id="712">712</span>
|
||||
<span id="713">713</span>
|
||||
<span id="714">714</span>
|
||||
<span id="715">715</span>
|
||||
<span id="716">716</span>
|
||||
<span id="717">717</span>
|
||||
<span id="718">718</span>
|
||||
<span id="719">719</span>
|
||||
<span id="720">720</span>
|
||||
<span id="721">721</span>
|
||||
<span id="722">722</span>
|
||||
<span id="723">723</span>
|
||||
<span id="724">724</span>
|
||||
<span id="725">725</span>
|
||||
<span id="726">726</span>
|
||||
<span id="727">727</span>
|
||||
<span id="728">728</span>
|
||||
<span id="729">729</span>
|
||||
<span id="730">730</span>
|
||||
<span id="731">731</span>
|
||||
<span id="732">732</span>
|
||||
<span id="733">733</span>
|
||||
<span id="734">734</span>
|
||||
<span id="735">735</span>
|
||||
<span id="736">736</span>
|
||||
<span id="737">737</span>
|
||||
<span id="738">738</span>
|
||||
<span id="739">739</span>
|
||||
<span id="740">740</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! Board module for components related to the checkers board and game structure</span>
|
||||
|
||||
@ -638,6 +748,9 @@
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">enums</span>;
|
||||
<span class="kw">use</span> <span class="ident">enums</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">enums</span>::<span class="ident">Team</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">enums</span>::<span class="ident">Strength</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">enums</span>::<span class="ident">SquareState</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">iter</span>;
|
||||
<span class="kw">use</span> <span class="ident">iter</span>::<span class="kw-2">*</span>;
|
||||
@ -653,7 +766,7 @@
|
||||
<span class="doccomment">/// Standard height of a checkers board is 8 squares</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">STD_HEIGHT</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">8</span>;
|
||||
|
||||
<span class="doccomment">/// Model a game piece by its team and strength (normal or kinged)</span>
|
||||
<span class="doccomment">/// Game piece given by its team and strength (normal or kinged)</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Piece</span> {
|
||||
@ -661,7 +774,9 @@
|
||||
<span class="ident">strength</span>: <span class="ident">Strength</span>
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="kw">impl</span> <span class="ident">Piece</span> {
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>(<span class="ident">constructor</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">team</span>: <span class="ident">Team</span>, <span class="ident">strength</span>: <span class="ident">Strength</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Piece</span> {
|
||||
<span class="ident">Piece</span> {
|
||||
<span class="ident">team</span>, <span class="ident">strength</span>
|
||||
@ -669,7 +784,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Model the standard diagonal movements by north west/east etc</span>
|
||||
<span class="doccomment">/// Standard diagonal movements given by north west/east etc</span>
|
||||
<span class="doccomment">/// </span>
|
||||
<span class="doccomment">/// Used as an absolute measure, i.e. not relative to the team making a move</span>
|
||||
<span class="doccomment">/// </span>
|
||||
@ -698,7 +813,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Model board squares by a state and a possible occupying game piece</span>
|
||||
<span class="doccomment">/// Board squares given by a state and a possible occupying game piece</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Square</span> {
|
||||
@ -708,16 +823,32 @@
|
||||
<span class="ident">state</span>: <span class="ident">SquareState</span>
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="kw">impl</span> <span class="ident">Square</span> {
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>(<span class="ident">constructor</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">state</span>: <span class="ident">SquareState</span>, <span class="ident">occupant</span>: <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Piece</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Square</span>{
|
||||
<span class="ident">Square</span> {
|
||||
<span class="ident">occupant</span>,
|
||||
<span class="ident">state</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pc</span>(<span class="ident">team</span>: <span class="ident">Team</span>, <span class="ident">strength</span>: <span class="ident">Strength</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Square</span> {
|
||||
<span class="ident">Square</span> {
|
||||
<span class="ident">occupant</span>: <span class="prelude-val">Some</span>(<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">team</span>, <span class="ident">strength</span>)),
|
||||
<span class="ident">state</span>: <span class="ident">Occupied</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">empty</span>() <span class="op">-</span><span class="op">></span> <span class="ident">Square</span> {
|
||||
<span class="ident">Square</span> {
|
||||
<span class="ident">occupant</span>: <span class="prelude-val">None</span>,
|
||||
<span class="ident">state</span>: <span class="ident">Empty</span>,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Model a rank 2 tensor index to identify a board square by row and column</span>
|
||||
<span class="doccomment">/// Rank 2 tensor index to identify a board square by row and column</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Copy</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">BrdIdx</span> {
|
||||
@ -744,9 +875,9 @@
|
||||
<span class="comment">// BOARD</span>
|
||||
<span class="comment">///////////////</span>
|
||||
|
||||
<span class="doccomment">/// Models a single state for a checkers board</span>
|
||||
<span class="doccomment">/// Single state of a checkers board</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Board</span> {
|
||||
<span class="doccomment">/// 1D backing array of board squares for the 2D game board</span>
|
||||
<span class="ident">cells</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Square</span><span class="op">></span>,
|
||||
@ -756,6 +887,10 @@
|
||||
<span class="ident">current_turn</span>: <span class="ident">Team</span>
|
||||
}
|
||||
|
||||
<span class="comment">///////////////////</span>
|
||||
<span class="comment">// PRIV FUNCS</span>
|
||||
<span class="comment">///////////////////</span>
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Board</span> {
|
||||
<span class="doccomment">/// Get a mutable reference to a board square by 1D array index</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">cell_mut</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Square</span> {
|
||||
@ -770,7 +905,7 @@
|
||||
<span class="doccomment">/// Some(Vec<usize>): A variable length vector of 1D indices for diagonally adjacent squares. </span>
|
||||
<span class="doccomment">/// Vector may be between 1 and 4 items long depending on the location of the given square</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">diagonal_indices</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">SquareState</span>::<span class="ident">Unplayable</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">Unplayable</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
|
||||
@ -820,7 +955,7 @@
|
||||
<span class="doccomment">/// </span>
|
||||
<span class="doccomment">/// Some(Direction<Square>): A [`Direction`] structure for the diagonally adjacent squares.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">adjacent_dir</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Direction</span><span class="op"><</span><span class="ident">Square</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">SquareState</span>::<span class="ident">Unplayable</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">Unplayable</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
|
||||
@ -856,8 +991,8 @@
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">filter_indices</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">BrdIdx</span>, <span class="ident">player</span>: <span class="ident">Team</span>, <span class="ident">indices</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span> {
|
||||
<span class="ident">indices</span>.<span class="ident">into_iter</span>().<span class="ident">filter</span>(<span class="op">|</span><span class="ident">i</span><span class="op">|</span> {
|
||||
<span class="kw">match</span> <span class="ident">player</span> {
|
||||
<span class="ident">Team</span>::<span class="ident">Black</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">board_index</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">row</span> <span class="op"><</span> <span class="ident">idx</span>.<span class="ident">row</span>,
|
||||
<span class="ident">Team</span>::<span class="ident">White</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">board_index</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">row</span> <span class="op">></span> <span class="ident">idx</span>.<span class="ident">row</span>,
|
||||
<span class="ident">Black</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">board_index</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">row</span> <span class="op"><</span> <span class="ident">idx</span>.<span class="ident">row</span>,
|
||||
<span class="ident">White</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">board_index</span>(<span class="kw-2">*</span><span class="ident">i</span>).<span class="ident">row</span> <span class="op">></span> <span class="ident">idx</span>.<span class="ident">row</span>,
|
||||
}
|
||||
}).<span class="ident">collect</span>()
|
||||
}
|
||||
@ -877,7 +1012,7 @@
|
||||
<span class="doccomment">/// Some(Vec<usize>): A variable length vector of 1D indices for diagonally jumpable squares. </span>
|
||||
<span class="doccomment">/// Vector may be between 1 and 4 items long depending on the location of the given square</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">jumpable_indices</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">usize</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">SquareState</span>::<span class="ident">Unplayable</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">Unplayable</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
|
||||
@ -927,7 +1062,7 @@
|
||||
<span class="doccomment">/// </span>
|
||||
<span class="doccomment">/// Some(Direction<Square>): A [`Direction`] structure for the diagonally jumpable squares.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">jumpable_dir</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Direction</span><span class="op"><</span><span class="ident">Square</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">SquareState</span>::<span class="ident">Unplayable</span> {
|
||||
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>)) <span class="op">=</span><span class="op">=</span> <span class="ident">Unplayable</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">None</span>;
|
||||
}
|
||||
|
||||
@ -965,8 +1100,18 @@
|
||||
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">None</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// cast the signed</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">idx_diffs</span>(<span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> (<span class="ident">isize</span>, <span class="ident">isize</span>) {
|
||||
<span class="comment">// cast to signed ints so that -1 will work for black moves</span>
|
||||
(<span class="ident">to</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">isize</span> <span class="op">-</span> <span class="ident">from</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">isize</span>, <span class="ident">to</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">isize</span> <span class="op">-</span> <span class="ident">from</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">isize</span>)
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">///////////////////</span>
|
||||
<span class="comment">// BOUND FUNCS</span>
|
||||
<span class="comment">///////////////////</span>
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="kw">impl</span> <span class="ident">Board</span> {
|
||||
<span class="doccomment">/// Get a copy of a board square by 1D array index</span>
|
||||
@ -974,6 +1119,15 @@
|
||||
<span class="self">self</span>.<span class="ident">cells</span>[<span class="ident">idx</span>]
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get a copy of a board square by 1D array index</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_cell</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">usize</span>, <span class="ident">square</span>: <span class="ident">Square</span>) {
|
||||
<span class="comment">// TODO: handle this error better?</span>
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">></span><span class="op">=</span> <span class="self">self</span>.<span class="ident">num_cells</span>() {
|
||||
<span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Given index is too large, idx: {}, square: {:?}"</span>, <span class="ident">idx</span>, <span class="ident">square</span>);
|
||||
}
|
||||
<span class="self">self</span>.<span class="ident">cells</span>[<span class="ident">idx</span>] <span class="op">=</span> <span class="ident">square</span>;
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get a copy of a board square by 2D [`BrdIdx`] index</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">grid_cell</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Square</span> {
|
||||
<span class="self">self</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">idx</span>))
|
||||
@ -996,6 +1150,7 @@
|
||||
<span class="ident">BrdIdx</span>::<span class="ident">from</span>(<span class="ident">row</span>, <span class="ident">col</span>)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Check whether a move given by source and destination indices is legal </span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">can_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
|
||||
<span class="kw">if</span> <span class="ident">from</span>.<span class="ident">row</span> <span class="op">></span> <span class="self">self</span>.<span class="ident">height</span> <span class="op">-</span> <span class="number">1</span> <span class="op">|</span><span class="op">|</span> <span class="ident">from</span>.<span class="ident">col</span> <span class="op">></span> <span class="self">self</span>.<span class="ident">width</span> <span class="op">-</span> <span class="number">1</span> {
|
||||
@ -1010,9 +1165,9 @@
|
||||
|
||||
<span class="comment">// check source square is occupied</span>
|
||||
<span class="kw">match</span> <span class="ident">from_square</span>.<span class="ident">state</span> {
|
||||
<span class="ident">SquareState</span>::<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">UnoccupiedSrc</span>,
|
||||
<span class="ident">SquareState</span>::<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">Unplayable</span>,
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">UnoccupiedSrc</span>,
|
||||
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">Unplayable</span>,
|
||||
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> {
|
||||
|
||||
<span class="comment">// if its not the current teams piece then error</span>
|
||||
<span class="kw">match</span> <span class="ident">from_square</span>.<span class="ident">occupant</span> {
|
||||
@ -1025,29 +1180,50 @@
|
||||
<span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">WrongTeamSrc</span>;
|
||||
}
|
||||
|
||||
<span class="comment">// cast to signed ints so that -1 will work for black moves</span>
|
||||
<span class="kw">let</span> <span class="ident">row_diff</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="ident">to</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">i32</span> <span class="op">-</span> <span class="ident">from</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">i32</span>;
|
||||
<span class="kw">let</span> <span class="ident">col_diff</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="ident">to</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">i32</span> <span class="op">-</span> <span class="ident">from</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">i32</span>;
|
||||
|
||||
<span class="comment">// depending on whether the piece is a king or not, the piece can make different moves</span>
|
||||
<span class="comment">// below validate_*_move() functions just check whether the trajectory is valid i.e a single ajacacent diagonal move for moves and 2 squares for a jump</span>
|
||||
<span class="comment">// this includes validating the jumpee when jumping</span>
|
||||
<span class="comment">// </span>
|
||||
<span class="comment">// we use the Allowed type to indicate that the trajectory check passed</span>
|
||||
<span class="comment">// but we catch it instead of returning to allow further checks on </span>
|
||||
<span class="comment">// the destination square</span>
|
||||
<span class="comment">// TODO: refactor to a IsMove()/IsJump() to check whether the move has a legal trajectory</span>
|
||||
<span class="kw">match</span> <span class="ident">from_square_occupant</span>.<span class="ident">strength</span> {
|
||||
<span class="ident">Strength</span>::<span class="ident">Man</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">validate_man_move</span>(<span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">row_diff</span>, <span class="ident">col_diff</span>, <span class="ident">from_square_occupant</span>),
|
||||
<span class="ident">Strength</span>::<span class="ident">King</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">validate_king_move</span>(<span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">row_diff</span>, <span class="ident">col_diff</span>, <span class="ident">from_square_occupant</span>),
|
||||
<span class="ident">Man</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">strength_check</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">validate_man_move</span>(<span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">from_square_occupant</span>);
|
||||
<span class="kw">if</span> <span class="ident">strength_check</span> <span class="op">!</span><span class="op">=</span> <span class="ident">Moveable</span>::<span class="ident">Allowed</span> {
|
||||
<span class="kw">return</span> <span class="ident">strength_check</span>;
|
||||
}
|
||||
},
|
||||
<span class="ident">King</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">strength_check</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">validate_king_move</span>(<span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">from_square_occupant</span>);
|
||||
<span class="kw">if</span> <span class="ident">strength_check</span> <span class="op">!</span><span class="op">=</span> <span class="ident">Moveable</span>::<span class="ident">Allowed</span> {
|
||||
<span class="kw">return</span> <span class="ident">strength_check</span>;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
<span class="kw">let</span> <span class="ident">to_square</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">cell_idx</span>(<span class="ident">to</span>));
|
||||
<span class="kw">match</span> <span class="ident">to_square</span>.<span class="ident">state</span> {
|
||||
<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">Allowed</span>;
|
||||
},
|
||||
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">Unplayable</span>,
|
||||
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> <span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">OccupiedDest</span>,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
<span class="ident">Moveable</span>::<span class="ident">Allowed</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_man_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">row_diff</span>: <span class="ident">i32</span>, <span class="ident">col_diff</span>: <span class="ident">i32</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_man_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
|
||||
<span class="comment">// men can only move forwards, below is row difference for each team</span>
|
||||
<span class="kw">let</span> <span class="ident">idx_scale</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">current_turn</span> {
|
||||
<span class="ident">Team</span>::<span class="ident">Black</span> <span class="op">=</span><span class="op">></span> <span class="op">-</span><span class="number">1</span>,
|
||||
<span class="ident">Team</span>::<span class="ident">White</span> <span class="op">=</span><span class="op">></span> <span class="number">1</span>,
|
||||
<span class="kw">let</span> <span class="ident">idx_scale</span>: <span class="ident">isize</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">current_turn</span> {
|
||||
<span class="ident">Black</span> <span class="op">=</span><span class="op">></span> <span class="op">-</span><span class="number">1</span>,
|
||||
<span class="ident">White</span> <span class="op">=</span><span class="op">></span> <span class="number">1</span>,
|
||||
};
|
||||
|
||||
<span class="comment">// legal standard move </span>
|
||||
@ -1067,14 +1243,14 @@
|
||||
<span class="kw">if</span> <span class="ident">col_diff</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span> {
|
||||
|
||||
<span class="comment">// piece to be jumped over</span>
|
||||
<span class="kw">let</span> <span class="ident">jumpee</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">get_jumpee</span>(<span class="ident">from</span>, <span class="ident">row_diff</span>, <span class="ident">col_diff</span>);
|
||||
<span class="kw">let</span> <span class="ident">jumpee</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">jumpee_idx</span>(<span class="ident">from</span>, <span class="ident">to</span>));
|
||||
<span class="kw">match</span> <span class="ident">jumpee</span>.<span class="ident">state</span> {
|
||||
<span class="ident">SquareState</span>::<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> <span class="ident">Moveable</span>::<span class="ident">NoJumpablePiece</span>,
|
||||
<span class="ident">SquareState</span>::<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Found an unplayable piece to try to jump over, from: {}, to: {}, jumpee: {:?}"</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">jumpee</span>),
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> <span class="ident">Moveable</span>::<span class="ident">NoJumpablePiece</span>,
|
||||
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Found an unplayable piece to try to jump over, from: {}, to: {}, jumpee: {:?}"</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">jumpee</span>),
|
||||
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> {
|
||||
|
||||
<span class="comment">// check whether jumpee is an opponent's piece</span>
|
||||
<span class="kw">return</span> <span class="ident">Board</span>::<span class="ident">validate_jumpee</span>(<span class="ident">jumpee</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">from_square_occupant</span>);
|
||||
<span class="kw">return</span> <span class="ident">Board</span>::<span class="ident">validate_jumpee</span>(<span class="ident">jumpee</span>, <span class="ident">from_square_occupant</span>);
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -1089,7 +1265,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_king_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">row_diff</span>: <span class="ident">i32</span>, <span class="ident">col_diff</span>: <span class="ident">i32</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_king_move</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_square_occupant</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
|
||||
<span class="comment">// legal standard move </span>
|
||||
<span class="kw">if</span> <span class="ident">row_diff</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="comment">// destination is directly to the left or right</span>
|
||||
@ -1107,14 +1285,14 @@
|
||||
<span class="kw">if</span> <span class="ident">col_diff</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="number">2</span> {
|
||||
|
||||
<span class="comment">// piece to be jumped over</span>
|
||||
<span class="kw">let</span> <span class="ident">jumpee</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">get_jumpee</span>(<span class="ident">from</span>, <span class="ident">row_diff</span>, <span class="ident">col_diff</span>);
|
||||
<span class="kw">let</span> <span class="ident">jumpee</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cell</span>(<span class="self">self</span>.<span class="ident">jumpee_idx</span>(<span class="ident">from</span>, <span class="ident">to</span>));
|
||||
<span class="kw">match</span> <span class="ident">jumpee</span>.<span class="ident">state</span> {
|
||||
<span class="ident">SquareState</span>::<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> <span class="ident">Moveable</span>::<span class="ident">NoJumpablePiece</span>,
|
||||
<span class="ident">SquareState</span>::<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Found an unplayable piece to try to jump over, from: {}, to: {}, jumpee: {:?}"</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">jumpee</span>),
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> <span class="ident">Moveable</span>::<span class="ident">NoJumpablePiece</span>,
|
||||
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"Found an unplayable piece to try to jump over, from: {}, to: {}, jumpee: {:?}"</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">jumpee</span>),
|
||||
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> {
|
||||
|
||||
<span class="comment">// check whether jumpee is an opponent's piece</span>
|
||||
<span class="kw">return</span> <span class="ident">Board</span>::<span class="ident">validate_jumpee</span>(<span class="ident">jumpee</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">from_square_occupant</span>);
|
||||
<span class="kw">return</span> <span class="ident">Board</span>::<span class="ident">validate_jumpee</span>(<span class="ident">jumpee</span>, <span class="ident">from_square_occupant</span>);
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -1129,20 +1307,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_jumpee</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">row_diff</span>: <span class="ident">i32</span>, <span class="ident">col_diff</span>: <span class="ident">i32</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Square</span> {
|
||||
<span class="self">self</span>.<span class="ident">cell</span>(
|
||||
<span class="self">self</span>.<span class="ident">cell_idx</span>(
|
||||
<span class="ident">BrdIdx</span>::<span class="ident">from</span>(
|
||||
((<span class="ident">from</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">i32</span>) <span class="op">+</span> <span class="ident">row_diff</span> <span class="op">/</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">usize</span>,
|
||||
((<span class="ident">from</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">i32</span>) <span class="op">+</span> <span class="ident">col_diff</span> <span class="op">/</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">usize</span>)
|
||||
)
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">jumpee_idx</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> (<span class="ident">row_diff</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
<span class="self">self</span>.<span class="ident">cell_idx</span>(
|
||||
<span class="ident">BrdIdx</span>::<span class="ident">from</span>(
|
||||
((<span class="ident">from</span>.<span class="ident">row</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">+</span> <span class="ident">row_diff</span> <span class="op">/</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">usize</span>,
|
||||
((<span class="ident">from</span>.<span class="ident">col</span> <span class="kw">as</span> <span class="ident">isize</span>) <span class="op">+</span> <span class="ident">col_diff</span> <span class="op">/</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">usize</span>)
|
||||
)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_jumpee</span>(<span class="ident">jumpee</span>: <span class="ident">Square</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>, <span class="ident">from_occ</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
<span class="doccomment">/// Unwrap the jumpee piece from the square and [`Board::check_jumpee_team`] with [`Moveable`] response</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">validate_jumpee</span>(<span class="ident">jumpee</span>: <span class="ident">Square</span>, <span class="ident">from_occ</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Moveable</span> {
|
||||
<span class="comment">// check whether jumpee is an opponent's piece</span>
|
||||
<span class="kw">match</span> <span class="ident">jumpee</span>.<span class="ident">occupant</span> {
|
||||
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"No occupant found when checking the jumpee, from: {}, to: {}, jumpee: {:?}"</span>, <span class="ident">from</span>, <span class="ident">to</span>, <span class="ident">jumpee</span>),
|
||||
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> <span class="macro">panic</span><span class="macro">!</span>(<span class="string">"No occupant found when checking the from: {:?} , jumpee: {:?}"</span>, <span class="ident">from_occ</span>, <span class="ident">jumpee</span>),
|
||||
<span class="prelude-val">Some</span>(<span class="ident">jumpee_occupant_uw</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">Board</span>::<span class="ident">check_jumpee_team</span>(<span class="ident">from_occ</span>, <span class="ident">jumpee_occupant_uw</span>) {
|
||||
<span class="kw">return</span> <span class="ident">Moveable</span>::<span class="ident">Allowed</span>;
|
||||
@ -1154,13 +1332,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<span class="doccomment">/// Check that the source piece and the jumpee are of opposing teams</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">check_jumpee_team</span>(<span class="ident">from</span>: <span class="ident">Piece</span>, <span class="ident">jumpee</span>: <span class="ident">Piece</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="kw">return</span> <span class="ident">from</span>.<span class="ident">team</span>.<span class="ident">opponent</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">jumpee</span>.<span class="ident">team</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Iniitalise a game board without game pieces</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Board</span> {
|
||||
<span class="doccomment">/// Initialise a game board without game pieces</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>(<span class="ident">constructor</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>, <span class="ident">current_turn</span>: <span class="ident">Team</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Board</span> {
|
||||
<span class="kw">let</span> <span class="ident">total_cells</span> <span class="op">=</span> <span class="ident">width</span> <span class="op">*</span> <span class="ident">height</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cells</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Square</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">with_capacity</span>(<span class="ident">total_cells</span>);
|
||||
@ -1169,10 +1348,10 @@
|
||||
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">height</span> {
|
||||
<span class="kw">for</span> <span class="kw">_</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">width</span> {
|
||||
<span class="kw">if</span> <span class="ident">playable</span> {
|
||||
<span class="ident">cells</span>.<span class="ident">push</span>(<span class="ident">Square</span>::<span class="ident">new</span>(<span class="ident">SquareState</span>::<span class="ident">Empty</span>, <span class="prelude-val">None</span>));
|
||||
<span class="ident">cells</span>.<span class="ident">push</span>(<span class="ident">Square</span>::<span class="ident">new</span>(<span class="ident">Empty</span>, <span class="prelude-val">None</span>));
|
||||
}
|
||||
<span class="kw">else</span> {
|
||||
<span class="ident">cells</span>.<span class="ident">push</span>(<span class="ident">Square</span>::<span class="ident">new</span>(<span class="ident">SquareState</span>::<span class="ident">Unplayable</span>, <span class="prelude-val">None</span>));
|
||||
<span class="ident">cells</span>.<span class="ident">push</span>(<span class="ident">Square</span>::<span class="ident">new</span>(<span class="ident">Unplayable</span>, <span class="prelude-val">None</span>));
|
||||
}
|
||||
<span class="ident">playable</span> <span class="op">=</span> <span class="op">!</span><span class="ident">playable</span>;
|
||||
}
|
||||
@ -1184,33 +1363,27 @@
|
||||
<span class="ident">width</span>,
|
||||
<span class="ident">height</span>,
|
||||
|
||||
<span class="ident">current_turn</span>: <span class="ident">Team</span>::<span class="ident">Black</span>
|
||||
<span class="ident">current_turn</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Reset the given board to a starting layout with 3 rows of opposing pieces</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">init_game</span>(<span class="ident">board</span>: <span class="ident">Board</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Board</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">init_game</span>(<span class="ident">board</span>: <span class="ident">Board</span>, <span class="ident">piece_rows</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Board</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_board</span> <span class="op">=</span> <span class="ident">board</span>.<span class="ident">clone</span>();
|
||||
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">row</span>) <span class="kw">in</span> <span class="ident">RowSquareIterator</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">board</span>).<span class="ident">enumerate</span>() {
|
||||
<span class="kw">for</span> (<span class="ident">jdx</span>, <span class="ident">square</span>) <span class="kw">in</span> <span class="ident">row</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
|
||||
|
||||
<span class="kw">if</span> <span class="ident">square</span>.<span class="ident">state</span> <span class="op">=</span><span class="op">=</span> <span class="ident">SquareState</span>::<span class="ident">Empty</span> <span class="op">|</span><span class="op">|</span> <span class="ident">square</span>.<span class="ident">state</span> <span class="op">=</span><span class="op">=</span> <span class="ident">SquareState</span>::<span class="ident">Occupied</span> {
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op"><</span> <span class="number">3</span> {
|
||||
<span class="kw">if</span> <span class="ident">square</span>.<span class="ident">state</span> <span class="op">=</span><span class="op">=</span> <span class="ident">Empty</span> <span class="op">|</span><span class="op">|</span> <span class="ident">square</span>.<span class="ident">state</span> <span class="op">=</span><span class="op">=</span> <span class="ident">Occupied</span> {
|
||||
<span class="kw">if</span> <span class="ident">idx</span> <span class="op"><</span> <span class="ident">piece_rows</span> {
|
||||
<span class="kw">let</span> <span class="ident">cell_idx</span> <span class="op">=</span> <span class="ident">new_board</span>.<span class="ident">cell_index</span>(<span class="ident">idx</span>, <span class="ident">jdx</span>);
|
||||
<span class="ident">new_board</span>.<span class="ident">cells</span>[<span class="ident">cell_idx</span>] <span class="op">=</span> <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span>,
|
||||
<span class="prelude-val">Some</span>(<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">Team</span>::<span class="ident">White</span>, <span class="ident">Strength</span>::<span class="ident">Man</span>))
|
||||
);
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">idx</span> <span class="op">></span><span class="op">=</span> <span class="ident">board</span>.<span class="ident">height</span> <span class="op">-</span> <span class="number">3</span> {
|
||||
<span class="ident">new_board</span>.<span class="ident">cells</span>[<span class="ident">cell_idx</span>] <span class="op">=</span> <span class="ident">Square</span>::<span class="ident">pc</span>(<span class="ident">White</span>, <span class="ident">Man</span>);
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">idx</span> <span class="op">></span><span class="op">=</span> <span class="ident">board</span>.<span class="ident">height</span> <span class="op">-</span> <span class="ident">piece_rows</span> {
|
||||
<span class="kw">let</span> <span class="ident">cell_idx</span> <span class="op">=</span> <span class="ident">new_board</span>.<span class="ident">cell_index</span>(<span class="ident">idx</span>, <span class="ident">jdx</span>);
|
||||
<span class="ident">new_board</span>.<span class="ident">cells</span>[<span class="ident">cell_idx</span>] <span class="op">=</span> <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span>,
|
||||
<span class="prelude-val">Some</span>(<span class="ident">Piece</span>::<span class="ident">new</span>(<span class="ident">Team</span>::<span class="ident">Black</span>, <span class="ident">Strength</span>::<span class="ident">Man</span>))
|
||||
);
|
||||
<span class="ident">new_board</span>.<span class="ident">cells</span>[<span class="ident">cell_idx</span>] <span class="op">=</span> <span class="ident">Square</span>::<span class="ident">pc</span>(<span class="ident">Black</span>, <span class="ident">Man</span>);
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">let</span> <span class="ident">cell_idx</span> <span class="op">=</span> <span class="ident">new_board</span>.<span class="ident">cell_index</span>(<span class="ident">idx</span>, <span class="ident">jdx</span>);
|
||||
<span class="ident">new_board</span>.<span class="ident">cells</span>[<span class="ident">cell_idx</span>] <span class="op">=</span> <span class="ident">Square</span>::<span class="ident">new</span>(
|
||||
<span class="ident">SquareState</span>::<span class="ident">Empty</span>,
|
||||
<span class="ident">Empty</span>,
|
||||
<span class="prelude-val">None</span>
|
||||
);
|
||||
}
|
||||
@ -1226,6 +1399,10 @@
|
||||
<span class="self">self</span>.<span class="ident">current_turn</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_turn</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">new_team</span>: <span class="ident">Team</span>) {
|
||||
<span class="self">self</span>.<span class="ident">current_turn</span> <span class="op">=</span> <span class="ident">new_team</span>;
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get a pointer to the backing array of board squares, [`Board::cells`]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">cells</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">*</span><span class="kw">const</span> <span class="ident">Square</span> {
|
||||
<span class="self">self</span>.<span class="ident">cells</span>.<span class="ident">as_ptr</span>()
|
||||
@ -1236,6 +1413,49 @@
|
||||
<span class="self">self</span>.<span class="ident">cells</span>.<span class="ident">len</span>()
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get the number of remaining pieces</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">num_pieces</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> <span class="ident">pieces</span>: <span class="ident">Vec</span><span class="op"><</span><span class="kw">_</span><span class="op">></span> <span class="op">=</span> <span class="ident">PieceIterator</span>::<span class="ident">new</span>(<span class="self">self</span>).<span class="ident">collect</span>();
|
||||
<span class="ident">pieces</span>.<span class="ident">len</span>()
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get the number of remaining pieces for a player</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">num_player</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">team</span>: <span class="ident">Team</span>) <span class="op">-</span><span class="op">></span> <span class="ident">usize</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">total</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="ident">square</span>) <span class="kw">in</span> <span class="ident">PieceIterator</span>::<span class="ident">new</span>(<span class="self">self</span>) {
|
||||
<span class="kw">match</span> <span class="ident">square</span>.<span class="ident">occupant</span> {
|
||||
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">></span> {},
|
||||
<span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">x</span>.<span class="ident">team</span> <span class="op">=</span><span class="op">=</span> <span class="ident">team</span> {
|
||||
<span class="ident">total</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
<span class="ident">total</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get the score value, Black - White pieces</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">score</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="ident">isize</span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">black</span>: <span class="ident">isize</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">white</span>: <span class="ident">isize</span> <span class="op">=</span> <span class="number">0</span>;
|
||||
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="ident">square</span>) <span class="kw">in</span> <span class="ident">PieceIterator</span>::<span class="ident">new</span>(<span class="self">self</span>) {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="ident">square</span>.<span class="ident">occupant</span> {
|
||||
<span class="kw">match</span> <span class="ident">x</span>.<span class="ident">team</span> {
|
||||
<span class="ident">Black</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">black</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
},
|
||||
<span class="ident">White</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="ident">white</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">black</span> <span class="op">-</span> <span class="ident">white</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Get the state of a board square by 1D array index</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">cell_state</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="ident">SquareState</span> {
|
||||
<span class="self">self</span>.<span class="ident">cell</span>(<span class="ident">idx</span>).<span class="ident">state</span>
|
||||
@ -1251,9 +1471,9 @@
|
||||
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">cell_index</span>(<span class="ident">i</span>, <span class="ident">j</span>);
|
||||
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">cell_state</span>(<span class="ident">idx</span>) {
|
||||
<span class="ident">SquareState</span>::<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> { <span class="macro">write</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="string">"{}"</span>, <span class="ident">SquareState</span>::<span class="ident">Empty</span>); },
|
||||
<span class="ident">SquareState</span>::<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> { <span class="macro">write</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="string">"{}"</span>, <span class="self">self</span>.<span class="ident">cell</span>(<span class="ident">idx</span>).<span class="ident">occupant</span>.<span class="ident">unwrap</span>().<span class="ident">team</span>); },
|
||||
<span class="ident">SquareState</span>::<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> { <span class="macro">write</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="string">"{}"</span>, <span class="ident">SquareState</span>::<span class="ident">Unplayable</span>); },
|
||||
<span class="ident">Empty</span> <span class="op">=</span><span class="op">></span> { <span class="macro">write</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="string">"_ "</span>); },
|
||||
<span class="ident">Occupied</span> <span class="op">=</span><span class="op">></span> { <span class="macro">write</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="string">"{} "</span>, <span class="self">self</span>.<span class="ident">cell</span>(<span class="ident">idx</span>).<span class="ident">occupant</span>.<span class="ident">unwrap</span>().<span class="ident">team</span>); },
|
||||
<span class="ident">Unplayable</span> <span class="op">=</span><span class="op">></span> { <span class="macro">write</span><span class="macro">!</span>(<span class="ident">string</span>, <span class="string">". "</span>); },
|
||||
}
|
||||
}
|
||||
<span class="ident">string</span>.<span class="ident">push</span>(<span class="string">'\n'</span>);
|
||||
|
290
doc/src/draught/game/mod.rs.html
Normal file
290
doc/src/draught/game/mod.rs.html
Normal file
@ -0,0 +1,290 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/game/mod.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>mod.rs - source</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../../draught/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10"> 10</span>
|
||||
<span id="11"> 11</span>
|
||||
<span id="12"> 12</span>
|
||||
<span id="13"> 13</span>
|
||||
<span id="14"> 14</span>
|
||||
<span id="15"> 15</span>
|
||||
<span id="16"> 16</span>
|
||||
<span id="17"> 17</span>
|
||||
<span id="18"> 18</span>
|
||||
<span id="19"> 19</span>
|
||||
<span id="20"> 20</span>
|
||||
<span id="21"> 21</span>
|
||||
<span id="22"> 22</span>
|
||||
<span id="23"> 23</span>
|
||||
<span id="24"> 24</span>
|
||||
<span id="25"> 25</span>
|
||||
<span id="26"> 26</span>
|
||||
<span id="27"> 27</span>
|
||||
<span id="28"> 28</span>
|
||||
<span id="29"> 29</span>
|
||||
<span id="30"> 30</span>
|
||||
<span id="31"> 31</span>
|
||||
<span id="32"> 32</span>
|
||||
<span id="33"> 33</span>
|
||||
<span id="34"> 34</span>
|
||||
<span id="35"> 35</span>
|
||||
<span id="36"> 36</span>
|
||||
<span id="37"> 37</span>
|
||||
<span id="38"> 38</span>
|
||||
<span id="39"> 39</span>
|
||||
<span id="40"> 40</span>
|
||||
<span id="41"> 41</span>
|
||||
<span id="42"> 42</span>
|
||||
<span id="43"> 43</span>
|
||||
<span id="44"> 44</span>
|
||||
<span id="45"> 45</span>
|
||||
<span id="46"> 46</span>
|
||||
<span id="47"> 47</span>
|
||||
<span id="48"> 48</span>
|
||||
<span id="49"> 49</span>
|
||||
<span id="50"> 50</span>
|
||||
<span id="51"> 51</span>
|
||||
<span id="52"> 52</span>
|
||||
<span id="53"> 53</span>
|
||||
<span id="54"> 54</span>
|
||||
<span id="55"> 55</span>
|
||||
<span id="56"> 56</span>
|
||||
<span id="57"> 57</span>
|
||||
<span id="58"> 58</span>
|
||||
<span id="59"> 59</span>
|
||||
<span id="60"> 60</span>
|
||||
<span id="61"> 61</span>
|
||||
<span id="62"> 62</span>
|
||||
<span id="63"> 63</span>
|
||||
<span id="64"> 64</span>
|
||||
<span id="65"> 65</span>
|
||||
<span id="66"> 66</span>
|
||||
<span id="67"> 67</span>
|
||||
<span id="68"> 68</span>
|
||||
<span id="69"> 69</span>
|
||||
<span id="70"> 70</span>
|
||||
<span id="71"> 71</span>
|
||||
<span id="72"> 72</span>
|
||||
<span id="73"> 73</span>
|
||||
<span id="74"> 74</span>
|
||||
<span id="75"> 75</span>
|
||||
<span id="76"> 76</span>
|
||||
<span id="77"> 77</span>
|
||||
<span id="78"> 78</span>
|
||||
<span id="79"> 79</span>
|
||||
<span id="80"> 80</span>
|
||||
<span id="81"> 81</span>
|
||||
<span id="82"> 82</span>
|
||||
<span id="83"> 83</span>
|
||||
<span id="84"> 84</span>
|
||||
<span id="85"> 85</span>
|
||||
<span id="86"> 86</span>
|
||||
<span id="87"> 87</span>
|
||||
<span id="88"> 88</span>
|
||||
<span id="89"> 89</span>
|
||||
<span id="90"> 90</span>
|
||||
<span id="91"> 91</span>
|
||||
<span id="92"> 92</span>
|
||||
<span id="93"> 93</span>
|
||||
<span id="94"> 94</span>
|
||||
<span id="95"> 95</span>
|
||||
<span id="96"> 96</span>
|
||||
<span id="97"> 97</span>
|
||||
<span id="98"> 98</span>
|
||||
<span id="99"> 99</span>
|
||||
<span id="100">100</span>
|
||||
<span id="101">101</span>
|
||||
<span id="102">102</span>
|
||||
<span id="103">103</span>
|
||||
<span id="104">104</span>
|
||||
<span id="105">105</span>
|
||||
<span id="106">106</span>
|
||||
<span id="107">107</span>
|
||||
<span id="108">108</span>
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
<span id="117">117</span>
|
||||
<span id="118">118</span>
|
||||
<span id="119">119</span>
|
||||
<span id="120">120</span>
|
||||
<span id="121">121</span>
|
||||
<span id="122">122</span>
|
||||
<span id="123">123</span>
|
||||
<span id="124">124</span>
|
||||
<span id="125">125</span>
|
||||
<span id="126">126</span>
|
||||
<span id="127">127</span>
|
||||
<span id="128">128</span>
|
||||
<span id="129">129</span>
|
||||
<span id="130">130</span>
|
||||
<span id="131">131</span>
|
||||
<span id="132">132</span>
|
||||
<span id="133">133</span>
|
||||
<span id="134">134</span>
|
||||
<span id="135">135</span>
|
||||
<span id="136">136</span>
|
||||
<span id="137">137</span>
|
||||
<span id="138">138</span>
|
||||
<span id="139">139</span>
|
||||
<span id="140">140</span>
|
||||
<span id="141">141</span>
|
||||
<span id="142">142</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::<span class="ident">Board</span>;
|
||||
<span class="kw">use</span> <span class="ident">indextree</span>::<span class="ident">Arena</span>;
|
||||
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
|
||||
<span class="kw">use</span> <span class="ident">wasm_bindgen</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">log</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::{<span class="ident">Square</span>, <span class="ident">BrdIdx</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::<span class="ident">enums</span>::{<span class="ident">SquareState</span>, <span class="ident">Moveable</span>, <span class="ident">Team</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">Team</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use</span> <span class="ident">SquareState</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>::{<span class="ident">Display</span>, <span class="ident">Write</span>};
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span> <span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span>;
|
||||
|
||||
<span class="doccomment">/// Root-level structure for managing the game as a collection of board states</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Game</span> {
|
||||
<span class="ident">current</span>: <span class="ident">Board</span>,
|
||||
<span class="ident">previous_boards</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Board</span><span class="op">></span>,
|
||||
<span class="comment">// tree: Arena<Board></span>
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Game</span> {
|
||||
<span class="doccomment">/// Get a read-only copy of a previous turn's board</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">previous_board</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">turn</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">Board</span> {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">previous_boards</span>[<span class="ident">turn</span>]
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Set current board to given</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">current_board</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="kw-2">&</span><span class="ident">Board</span> {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">current</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="kw">impl</span> <span class="ident">Game</span> {
|
||||
<span class="doccomment">/// Attempt to make a move given a source and destination index</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">make_move</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>) {
|
||||
<span class="kw">let</span> <span class="ident">able</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">can_move</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">Moveable</span>::<span class="ident">Allowed</span> <span class="op">=</span> <span class="ident">able</span> {
|
||||
<span class="kw">let</span> (<span class="kw">_</span>, <span class="ident">col_diff</span>) <span class="op">=</span> <span class="ident">Board</span>::<span class="ident">idx_diffs</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
<span class="comment">// MOVE</span>
|
||||
<span class="kw">if</span> <span class="ident">col_diff</span>.<span class="ident">abs</span>() <span class="op">=</span><span class="op">=</span> <span class="number">1</span> {
|
||||
<span class="self">self</span>.<span class="ident">execute_move</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
}
|
||||
<span class="comment">// JUMP</span>
|
||||
<span class="kw">else</span> {
|
||||
<span class="self">self</span>.<span class="ident">execute_jump</span>(<span class="ident">from</span>, <span class="ident">to</span>);
|
||||
}
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">log</span><span class="macro">!</span>(<span class="string">"Unable to make move, {:?}"</span>, <span class="ident">able</span>);
|
||||
}
|
||||
|
||||
<span class="comment">// board has been changed, update player turn</span>
|
||||
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">set_turn</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">current_turn</span>().<span class="ident">opponent</span>());
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Update board state with given move and push new board into current state</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">execute_move</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>) {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_board</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">clone</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">from_idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell_idx</span>(<span class="ident">from</span>);
|
||||
<span class="kw">let</span> <span class="ident">to_idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell_idx</span>(<span class="ident">to</span>);
|
||||
|
||||
<span class="comment">// make move update</span>
|
||||
<span class="ident">new_board</span>.<span class="ident">set_cell</span>(
|
||||
<span class="ident">to_idx</span>, <span class="comment">// destination square</span>
|
||||
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell</span>(<span class="ident">from_idx</span>) <span class="comment">// source piece</span>
|
||||
);
|
||||
|
||||
<span class="comment">// remove old piece</span>
|
||||
<span class="ident">new_board</span>.<span class="ident">set_cell</span>(
|
||||
<span class="ident">from_idx</span>, <span class="comment">// destination square</span>
|
||||
<span class="ident">Square</span>::<span class="ident">empty</span>() <span class="comment">// empty piece</span>
|
||||
);
|
||||
|
||||
<span class="comment">// set new board to current and push current to stack</span>
|
||||
<span class="self">self</span>.<span class="ident">push_new_board</span>(<span class="ident">new_board</span>);
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Update board state with given jump move and push new board into current state</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">execute_jump</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">from</span>: <span class="ident">BrdIdx</span>, <span class="ident">to</span>: <span class="ident">BrdIdx</span>) {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_board</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">clone</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">from_idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell_idx</span>(<span class="ident">from</span>);
|
||||
<span class="kw">let</span> <span class="ident">to_idx</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell_idx</span>(<span class="ident">from</span>);
|
||||
|
||||
<span class="comment">// make move update</span>
|
||||
<span class="ident">new_board</span>.<span class="ident">set_cell</span>(
|
||||
<span class="ident">to_idx</span>, <span class="comment">// destination square</span>
|
||||
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">cell</span>(<span class="ident">from_idx</span>) <span class="comment">// source piece</span>
|
||||
);
|
||||
|
||||
<span class="comment">// remove old piece</span>
|
||||
<span class="ident">new_board</span>.<span class="ident">set_cell</span>(
|
||||
<span class="ident">from_idx</span>, <span class="comment">// destination square</span>
|
||||
<span class="ident">Square</span>::<span class="ident">empty</span>() <span class="comment">// empty piece</span>
|
||||
);
|
||||
|
||||
<span class="comment">// remove jumpee</span>
|
||||
<span class="ident">new_board</span>.<span class="ident">set_cell</span>(
|
||||
<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">jumpee_idx</span>(<span class="ident">from</span>, <span class="ident">to</span>), <span class="comment">// destination square</span>
|
||||
<span class="ident">Square</span>::<span class="ident">empty</span>() <span class="comment">// empty piece</span>
|
||||
);
|
||||
|
||||
<span class="comment">// set new board to current and push current to stack</span>
|
||||
<span class="self">self</span>.<span class="ident">push_new_board</span>(<span class="ident">new_board</span>);
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Push current board into the previous turns and set given board to current</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">push_new_board</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">board</span>: <span class="ident">Board</span>) {
|
||||
<span class="self">self</span>.<span class="ident">previous_boards</span>.<span class="ident">push</span>(<span class="self">self</span>.<span class="ident">current</span>.<span class="ident">clone</span>());
|
||||
<span class="self">self</span>.<span class="ident">set_current</span>(<span class="ident">board</span>);
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Set current board to given</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">set_current</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">board</span>: <span class="ident">Board</span>) {
|
||||
<span class="self">self</span>.<span class="ident">current</span> <span class="op">=</span> <span class="ident">board</span>;
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>(<span class="ident">constructor</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">width</span>: <span class="ident">usize</span>, <span class="ident">height</span>: <span class="ident">usize</span>, <span class="ident">piece_rows</span>: <span class="ident">usize</span>, <span class="ident">first_turn</span>: <span class="ident">Team</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Game</span> {
|
||||
<span class="ident">Game</span> {
|
||||
<span class="ident">current</span>: <span class="ident">Board</span>::<span class="ident">init_game</span>(
|
||||
<span class="ident">Board</span>::<span class="ident">new</span>(<span class="ident">width</span>, <span class="ident">height</span>, <span class="ident">first_turn</span>), <span class="ident">piece_rows</span>,
|
||||
),
|
||||
<span class="ident">previous_boards</span>: <span class="ident">Vec</span>::<span class="ident">with_capacity</span>(<span class="number">10</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Display</span> <span class="kw">for</span> <span class="ident">Game</span> {
|
||||
<span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">std</span>::<span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">std</span>::<span class="ident">fmt</span>::<span class="prelude-ty">Result</span>{
|
||||
<span class="macro">write</span><span class="macro">!</span>(<span class="ident">f</span>, <span class="string">"{}"</span>, <span class="self">self</span>.<span class="ident">current</span>)
|
||||
}
|
||||
}</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="draught" data-search-js="../../../search-index.js"></div>
|
||||
<script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script></body></html>
|
@ -37,6 +37,7 @@
|
||||
<span id="34">34</span>
|
||||
<span id="35">35</span>
|
||||
<span id="36">36</span>
|
||||
<span id="37">37</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! Draught</span>
|
||||
<span class="doccomment">//! </span>
|
||||
@ -45,6 +46,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">board</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">utils</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">game</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">player</span>;
|
||||
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
|
||||
<span class="kw">use</span> <span class="ident">wasm_bindgen</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
||||
|
@ -1,32 +1,22 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/game.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>game.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/player.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>player.rs - source</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../draught/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
|
||||
<span id="2"> 2</span>
|
||||
<span id="3"> 3</span>
|
||||
<span id="4"> 4</span>
|
||||
<span id="5"> 5</span>
|
||||
<span id="6"> 6</span>
|
||||
<span id="7"> 7</span>
|
||||
<span id="8"> 8</span>
|
||||
<span id="9"> 9</span>
|
||||
<span id="10">10</span>
|
||||
<span id="11">11</span>
|
||||
<span id="12">12</span>
|
||||
<span id="13">13</span>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1">1</span>
|
||||
<span id="2">2</span>
|
||||
<span id="3">3</span>
|
||||
<span id="4">4</span>
|
||||
<span id="5">5</span>
|
||||
<span id="6">6</span>
|
||||
<span id="7">7</span>
|
||||
<span id="8">8</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">board</span>::<span class="ident">Board</span>;
|
||||
<span class="kw">use</span> <span class="ident">indextree</span>::<span class="ident">Arena</span>;
|
||||
|
||||
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">wasm_bindgen</span>;
|
||||
<span class="kw">use</span> <span class="ident">wasm_bindgen</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="doccomment">/// Root-level structure for managing the game as a collection of board states</span>
|
||||
<span class="attribute">#[<span class="ident">wasm_bindgen</span>]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Game</span> {
|
||||
<span class="ident">current</span>: <span class="ident">Board</span>,
|
||||
<span class="ident">previous_boards</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">Board</span><span class="op">></span>,
|
||||
<span class="ident">tree</span>: <span class="ident">Arena</span><span class="op"><</span><span class="ident">Board</span><span class="op">></span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Player</span> {
|
||||
<span class="ident">score</span>: <span class="ident">usize</span>,
|
||||
}</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="draught" data-search-js="../../search-index.js"></div>
|
||||
<script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script></body></html>
|
BIN
ec83f0cc0b0f5722fdc1.module.wasm
Normal file
BIN
ec83f0cc0b0f5722fdc1.module.wasm
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user