diff --git a/10.bootstrap.js b/10.bootstrap.js index 25a7957..8681f9e 100644 --- a/10.bootstrap.js +++ b/10.bootstrap.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(t,e,r)=>{r.a(t,(async(n,_)=>{try{r.d(e,{C4:()=>V,Ck:()=>q,DA:()=>G,EF:()=>Tt,HS:()=>Q,Ih:()=>W,In:()=>ot,Ip:()=>xt,KK:()=>pt,KQ:()=>yt,M9:()=>it,OF:()=>wt,Oo:()=>It,Or:()=>Nt,Os:()=>$,SZ:()=>S,T8:()=>_t,TL:()=>ft,Tt:()=>N,U5:()=>L,U7:()=>at,Ws:()=>nt,XP:()=>Z,YN:()=>Ot,_3:()=>ht,ae:()=>F,bx:()=>bt,cb:()=>kt,fO:()=>X,fY:()=>jt,fi:()=>gt,gk:()=>K,h4:()=>H,hx:()=>ut,i0:()=>j,iY:()=>Y,k4:()=>dt,kq:()=>et,lA:()=>A,mS:()=>J,m_:()=>St,nf:()=>rt,oH:()=>Bt,pt:()=>tt,pv:()=>ct,r2:()=>z,rC:()=>Et,rh:()=>U,u6:()=>st,ug:()=>M,vm:()=>vt,wc:()=>E,xB:()=>mt,yX:()=>P,yq:()=>D,z2:()=>lt});var a=r(657);t=r.hmd(t);var c=n([a]);a=(c.then?(await c)():c)[0];const o=new Array(32).fill(void 0);function i(t){return o[t]}o.push(void 0,null,!0,!1);let s=o.length;function u(t){t<36||(o[t]=s,s=t)}function l(t){const e=i(t);return u(t),e}let p=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();let d=null;function b(){return null!==d&&d.buffer===a.memory.buffer||(d=new Uint8Array(a.memory.buffer)),d}function g(t,e){return p.decode(b().subarray(t,t+e))}function f(t){s===o.length&&o.push(o.length+1);const e=s;return s=o[e],o[e]=t,e}function h(t){const e=typeof t;if("number"==e||"boolean"==e||null==t)return`${t}`;if("string"==e)return`"${t}"`;if("symbol"==e){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const e=t.length;let r="[";e>0&&(r+=h(t[0]));for(let n=1;n1))return toString.call(t);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:n}let w=0,m=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const y="function"==typeof m.encodeInto?function(t,e){return m.encodeInto(t,e)}:function(t,e){const r=m.encode(t);return e.set(r),{read:t.length,written:r.length}};function v(t,e,r){if(void 0===r){const r=m.encode(t),n=e(r.length);return b().subarray(n,n+r.length).set(r),w=r.length,n}let n=t.length,_=e(n);const a=b();let c=0;for(;c127)break;a[_+c]=e}if(c!==n){0!==c&&(t=t.slice(c)),_=r(_,n,n=c+3*t.length);const e=b().subarray(_+c,_+n);c+=y(t,e).written}return w=c,_}let T=null;function k(){return null!==T&&T.buffer===a.memory.buffer||(T=new Int32Array(a.memory.buffer)),T}function x(t){return null==t}function I(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function E(){a.init_wasm()}function O(t,e){try{return t.apply(this,e)}catch(t){a.__wbindgen_exn_store(f(t))}}Object.freeze({Move:0,0:"Move",Jump:1,1:"Jump"});const S=Object.freeze({Black:0,0:"Black",White:1,1:"White"}),j=(Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"})),N=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"});class B{static __wrap(t){const e=Object.create(B.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_board_free(t)}get width(){return a.__wbg_get_board_width(this.ptr)>>>0}set width(t){a.__wbg_set_board_width(this.ptr,t)}get height(){return a.__wbg_get_board_height(this.ptr)>>>0}set height(t){a.__wbg_set_board_height(this.ptr,t)}get current_turn(){return a.__wbg_get_board_current_turn(this.ptr)>>>0}set current_turn(t){a.__wbg_set_board_current_turn(this.ptr,t)}cell(t){const e=a.board_cell(this.ptr,t);return R.__wrap(e)}set_cell(t,e){I(e,R);var r=e.ptr;e.ptr=0,a.board_set_cell(this.ptr,t,r)}grid_cell(t){I(t,U);var e=t.ptr;t.ptr=0;const r=a.board_grid_cell(this.ptr,e);return R.__wrap(r)}cell_index(t,e){return a.board_cell_index(this.ptr,t,e)>>>0}cell_idx(t){I(t,U);var e=t.ptr;return t.ptr=0,a.board_cell_idx(this.ptr,e)>>>0}board_index(t){const e=a.board_board_index(this.ptr,t);return U.__wrap(e)}can_move(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;return e.ptr=0,a.board_can_move(this.ptr,r,n)>>>0}validate_man_move(t,e,r){I(t,U);var n=t.ptr;t.ptr=0,I(e,U);var _=e.ptr;e.ptr=0,I(r,C);var c=r.ptr;return r.ptr=0,a.board_validate_man_move(this.ptr,n,_,c)>>>0}validate_king_move(t,e,r){I(t,U);var n=t.ptr;t.ptr=0,I(e,U);var _=e.ptr;e.ptr=0,I(r,C);var c=r.ptr;return r.ptr=0,a.board_validate_king_move(this.ptr,n,_,c)>>>0}jumpee_idx(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;return e.ptr=0,a.board_jumpee_idx(this.ptr,r,n)>>>0}cells(){return a.board_cells(this.ptr)}num_cells(){return a.board_num_cells(this.ptr)>>>0}num_pieces(){return a.board_num_pieces(this.ptr)>>>0}num_player(t){return a.board_num_player(this.ptr,t)>>>0}score(){return a.board_score(this.ptr)}cell_state(t){return a.board_cell_state(this.ptr,t)>>>0}apply_move(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;e.ptr=0;const _=a.board_apply_move(this.ptr,r,n);return B.__wrap(_)}apply_jump(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;e.ptr=0;const _=a.board_apply_jump(this.ptr,r,n);return B.__wrap(_)}king_row_idx(){return a.board_king_row_idx(this.ptr)>>>0}static validate_jumpee(t,e){I(t,R);var r=t.ptr;t.ptr=0,I(e,C);var n=e.ptr;return e.ptr=0,a.board_validate_jumpee(r,n)>>>0}static check_jumpee_team(t,e){I(t,C);var r=t.ptr;t.ptr=0,I(e,C);var n=e.ptr;return e.ptr=0,0!==a.board_check_jumpee_team(r,n)}constructor(t,e,r){const n=a.board_new(t,e,r);return B.__wrap(n)}static init_game(t,e){I(t,B);var r=t.ptr;t.ptr=0;const n=a.board_init_game(r,e);return B.__wrap(n)}}class U{static __wrap(t){const e=Object.create(U.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_brdidx_free(t)}get row(){return a.__wbg_get_brdidx_row(this.ptr)>>>0}set row(t){a.__wbg_set_brdidx_row(this.ptr,t)}get col(){return a.__wbg_get_brdidx_col(this.ptr)>>>0}set col(t){a.__wbg_set_brdidx_col(this.ptr,t)}constructor(t,e){const r=a.brdidx_from(t,e);return U.__wrap(r)}eq(t){return I(t,U),0!==a.brdidx_eq(this.ptr,t.ptr)}}class A{static __wrap(t){const e=Object.create(A.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_game_free(t)}get last_node_count(){return a.__wbg_get_game_last_node_count(this.ptr)>>>0}set last_node_count(t){a.__wbg_set_game_last_node_count(this.ptr,t)}get perfect_chance(){return a.__wbg_get_game_perfect_chance(this.ptr)}set perfect_chance(t){a.__wbg_set_game_perfect_chance(this.ptr,t)}current_board_cells(){return a.game_current_board_cells(this.ptr)}current_board_len(){return a.game_current_board_len(this.ptr)>>>0}current_turn(){return a.game_current_turn(this.ptr)>>>0}score(){return a.game_score(this.ptr)}winning(){const t=a.game_winning(this.ptr);return 2===t?void 0:t}has_won(){const t=a.game_has_won(this.ptr);return 2===t?void 0:t}current_cell_state(t){I(t,U);const e=a.game_current_cell_state(this.ptr,t.ptr);return R.__wrap(e)}set_search_depth(t){a.game_set_search_depth(this.ptr,t)}set_selected(t){I(t,U),a.game_set_selected(this.ptr,t.ptr)}set_perfect_chance(t){a.game_set_perfect_chance(this.ptr,t)}clear_selected(){a.game_clear_selected(this.ptr)}make_move(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;return e.ptr=0,a.game_make_move(this.ptr,r,n)>>>0}execute_move(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;e.ptr=0,a.game_execute_move(this.ptr,r,n)}execute_jump(t,e){I(t,U);var r=t.ptr;t.ptr=0,I(e,U);var n=e.ptr;e.ptr=0,a.game_execute_jump(this.ptr,r,n)}push_new_board(t){I(t,B);var e=t.ptr;t.ptr=0,a.game_push_new_board(this.ptr,e)}set_current(t){I(t,B);var e=t.ptr;t.ptr=0,a.game_set_current(this.ptr,e)}constructor(t,e,r,n,_){const c=a.game_new(t,e,r,n,_);return A.__wrap(c)}static new_with_canvas(t,e,r,n,_,c,o,i){const s=v(c,a.__wbindgen_malloc,a.__wbindgen_realloc),u=w,l=a.game_new_with_canvas(t,e,r,n,_,s,u,o,i);return A.__wrap(l)}set_painter(t){I(t,q);var e=t.ptr;t.ptr=0,a.game_set_painter(this.ptr,e)}draw(){a.game_draw(this.ptr)}ai_move(){a.game_ai_move(this.ptr)}}class q{static __wrap(t){const e=Object.create(q.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_painter_free(t)}constructor(t,e,r){const n=v(r,a.__wbindgen_malloc,a.__wbindgen_realloc),_=w,c=a.painter_new(t,e,n,_);return q.__wrap(c)}static new_with_canvas(t,e,r){const n=a.painter_new_with_canvas(t,e,f(r));return q.__wrap(n)}set_square_outline(t){a.painter_set_square_outline(this.ptr,f(t))}set_outline_width(t){a.painter_set_outline_width(this.ptr,t)}set_draw_outline(t){a.painter_set_draw_outline(this.ptr,t)}reset_dimensions(){a.painter_reset_dimensions(this.ptr)}validate_board_dim(t){return I(t,B),0!==a.painter_validate_board_dim(this.ptr,t.ptr)}draw(t){I(t,B),a.painter_draw(this.ptr,t.ptr)}}class C{static __wrap(t){const e=Object.create(C.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_piece_free(t)}get team(){return a.__wbg_get_piece_team(this.ptr)>>>0}set team(t){a.__wbg_set_piece_team(this.ptr,t)}get strength(){return a.__wbg_get_piece_strength(this.ptr)>>>0}set strength(t){a.__wbg_set_piece_strength(this.ptr,t)}constructor(t,e){const r=a.piece_new(t,e);return C.__wrap(r)}}class R{static __wrap(t){const e=Object.create(R.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_square_free(t)}get occupant(){const t=a.__wbg_get_square_occupant(this.ptr);return 0===t?void 0:C.__wrap(t)}set occupant(t){let e=0;x(t)||(I(t,C),e=t.ptr,t.ptr=0),a.__wbg_set_square_occupant(this.ptr,e)}get state(){return a.__wbg_get_square_state(this.ptr)>>>0}set state(t){a.__wbg_set_square_state(this.ptr,t)}constructor(t,e){let r=0;x(e)||(I(e,C),r=e.ptr,e.ptr=0);const n=a.square_new(t,r);return R.__wrap(n)}static pc(t,e){const r=a.square_pc(t,e);return R.__wrap(r)}static empty(){const t=a.square_empty();return R.__wrap(t)}static unplay(){const t=a.square_unplay();return R.__wrap(t)}}function M(t){l(t)}function H(t,e){return f(g(t,e))}function W(){return f(new Error)}function D(t,e){const r=v(i(e).stack,a.__wbindgen_malloc,a.__wbindgen_realloc),n=w;k()[t/4+1]=n,k()[t/4+0]=r}function K(t,e){try{console.error(g(t,e))}finally{a.__wbindgen_free(t,e)}}function $(t,e,r){var n,_;i(t).randomFillSync((n=e,_=r,b().subarray(n/1,n/1+_)))}function F(t,e){i(t).getRandomValues(i(e))}function L(){return O((function(){return f(self.self)}),arguments)}function Y(t){return f(i(t).crypto)}function J(t){return f(i(t).msCrypto)}function Z(t){return void 0===i(t)}function z(t,e,r){return f(i(t).require(g(e,r)))}function P(t){return f(i(t).getRandomValues)}function G(){return f(t)}function X(t){return i(t)instanceof Window}function V(t){const e=i(t).document;return x(e)?0:f(e)}function Q(t,e,r){const n=i(t).getElementById(g(e,r));return x(n)?0:f(n)}function tt(t){console.error(i(t))}function et(t){console.log(i(t))}function rt(t){return i(t)instanceof CanvasRenderingContext2D}function nt(t,e){i(t).strokeStyle=i(e)}function _t(t,e){i(t).fillStyle=i(e)}function at(t,e){i(t).lineWidth=e}function ct(t){i(t).beginPath()}function ot(t){i(t).fill()}function it(t){i(t).stroke()}function st(){return O((function(t,e,r,n,_,a){i(t).arc(e,r,n,_,a)}),arguments)}function ut(t,e,r,n,_){i(t).fillRect(e,r,n,_)}function lt(t,e,r,n,_){i(t).strokeRect(e,r,n,_)}function pt(t){return i(t)instanceof HTMLCanvasElement}function dt(t,e){i(t).width=e>>>0}function bt(t,e){i(t).height=e>>>0}function gt(){return O((function(t,e,r){const n=i(t).getContext(g(e,r));return x(n)?0:f(n)}),arguments)}function ft(t,e){return f(new Function(g(t,e)))}function ht(){return O((function(t,e){return f(i(t).call(i(e)))}),arguments)}function wt(){return O((function(){return f(self.self)}),arguments)}function mt(){return O((function(){return f(window.window)}),arguments)}function yt(){return O((function(){return f(globalThis.globalThis)}),arguments)}function vt(){return O((function(){return f(r.g.global)}),arguments)}function Tt(t){return f(i(t).buffer)}function kt(t){return f(new Uint8Array(i(t)))}function xt(t,e,r){i(t).set(i(e),r>>>0)}function It(t){return i(t).length}function Et(t){return f(new Uint8Array(t>>>0))}function Ot(t,e,r){return f(i(t).subarray(e>>>0,r>>>0))}function St(t){return f(i(t))}function jt(t,e){const r=v(h(i(e)),a.__wbindgen_malloc,a.__wbindgen_realloc),n=w;k()[t/4+1]=n,k()[t/4+0]=r}function Nt(t,e){throw new Error(g(t,e))}function Bt(){return f(a.memory)}_()}catch(Ut){_(Ut)}}))},10:(t,e,r)=>{r.a(t,(async(t,n)=>{try{r.r(e);var _=r(171),a=t([_]);_=(a.then?(await a)():a)[0];const l=720,p=720;var c=8,o=8,i=3,s=4,u=.5;const d=3e3,b=3e3,g={HUMAN_TURN:{THINKING:"human_turn.thinking",FROM_SELECTED:"human_turn.from_selected"},AI_TURN:"ai_turn"};(0,_.wc)(),document.getElementById("status-p");const f=document.getElementById("status-d"),h=document.getElementById("team-p"),w=document.getElementById("node-count"),m=document.getElementById("winning-p");document.getElementById("startBtn").onclick=S;let y=null,v=null,T=B,k=g.HUMAN_TURN.THINKING,x=null,I=null,E=[];S();const O=document.getElementById("game-canvas");function S(){x=new _.lA(c,o,i,_.SZ.Black,s),I=new _.Ck(l,p,"game-canvas"),x.set_painter(I),x.draw(),clearInterval(y),U(),A(),E=[],k=g.HUMAN_TURN.THINKING}function j(t){switch(k){case g.HUMAN_TURN.THINKING:if(x.current_cell_state(t).state!=_.i0.Occupied)return;if(x.current_cell_state(t).occupant.team!=x.current_turn())return;E.push(t),k=g.HUMAN_TURN.FROM_SELECTED,x.set_selected(t),x.draw();break;case g.HUMAN_TURN.FROM_SELECTED:if(!E[0].eq(t)){if(x.current_cell_state(t).state!=_.i0.Empty)return;if(E.push(t),2!=E.length)return T(`Error: wrong number of clicks to process ${E.length}`),void console.error(`Error: wrong number of clicks to process ${E.length}`);switch(x.make_move(E[0],E[1])){case _.Tt.Allowed:if(F.checked&&void 0===x.has_won()){let t=performance.now();x.ai_move();let e=performance.now();w.innerText=`searched ${x.last_node_count.toLocaleString("en-GB")} possible moves in ${(e-t).toLocaleString()}ms`}break;case _.Tt.IllegalTrajectory:T("You can't move like that!");break;case _.Tt.JumpingSameTeam:T("You can't jump your own piece!");break;case _.Tt.NoJumpablePiece:T("There's nothing to jump!");break;case _.Tt.OccupiedDest:T("There's a piece there!");break;case _.Tt.OutOfBounds:T("That square's not on the board! (how have you managed that?)");break;case _.Tt.UnoccupiedSrc:T("There's no piece to move!");break;case _.Tt.Unplayable:T("That's not a playable square!");break;case _.Tt.WrongTeamSrc:T("That's not your piece!")}}x.clear_selected(),x.draw(),E=[],k=g.HUMAN_TURN.THINKING;break;case g.AI_TURN:console.log("It's the AI's turn!")}U(),A(),q()}function N(t,e){var r=t.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}function B(t,e="danger",r=!0){null!=v&&clearInterval(v),f.className=`alert alert-${e}`,f.innerText=t,f.hidden=!1,r&&(v=setTimeout((()=>{f.hidden=!0}),d))}function U(){switch(x.current_turn()){case _.SZ.White:h.innerText="⚪ White ⚪";break;case _.SZ.Black:h.innerText="🔴 Black 🔴"}}function A(){switch(x.winning()){case void 0:m.innerText="";break;case _.SZ.White:m.innerText="👑 White 👑";break;case _.SZ.Black:m.innerText="👑 Black 👑"}}function q(){switch(x.has_won()){case void 0:break;case _.SZ.White:T("You Lost!"),y=setInterval((()=>{S()}),b);break;case _.SZ.Black:T("You Won!","success"),y=setInterval((()=>{S()}),b)}}O.addEventListener("click",(t=>{var e=N(O,t);j(new _.rh(Math.floor(e.y/O.clientHeight*o),Math.floor(e.x/O.clientWidth*c)))}));const C=document.getElementById("width"),R=()=>{c=parseInt(C.value),S()};C.onchange=R,C.value=8;const M=document.getElementById("height"),H=()=>{o=parseInt(M.value),W.max=o/2-1,S()};M.onchange=H,M.value=8;const W=document.getElementById("play_rows"),D=()=>{i=parseInt(W.value),S()};W.onchange=D,W.value=3;const K=document.getElementById("ai_search_depth"),$=()=>{s=parseInt(K.value),x.set_search_depth(s),s>4&&T("This increases thinking time exponentially, be careful (probably don't go past 6)","warning")};K.onchange=$,K.value=4;const F=document.getElementById("ai-checkbox"),L=()=>{};F.onchange=L;const Y=document.getElementById("ai_difficulty"),J=()=>{u=parseInt(Y.value)/100,x.set_perfect_chance(u)};Y.onchange=J,Y.value=50,n()}catch(Z){n(Z)}}))},657:(t,e,r)=>{r.a(t,(async(n,_)=>{try{var a,c=n([a=r(171)]),[a]=c.then?(await c)():c;await r.v(e,t.id,"3779a77aa968ad91d198",{"./draught_bg.js":{__wbindgen_object_drop_ref:a.ug,__wbindgen_string_new:a.h4,__wbg_new_693216e109162396:a.Ih,__wbg_stack_0ddaca5d1abfb52f:a.yq,__wbg_error_09919627ac0992f5:a.gk,__wbg_randomFillSync_d2ba53160aec6aba:a.Os,__wbg_getRandomValues_e57c9b75ddead065:a.ae,__wbg_self_86b4b13392c7af56:a.U5,__wbg_crypto_b8c92eaac23d0d80:a.iY,__wbg_msCrypto_9ad6677321a08dd8:a.mS,__wbindgen_is_undefined:a.XP,__wbg_require_f5521a5b85ad2542:a.r2,__wbg_getRandomValues_dd27e6b0652b3236:a.yX,__wbg_static_accessor_MODULE_452b4680e8614c81:a.DA,__wbg_instanceof_Window_0e6c0f1096d66c3c:a.fO,__wbg_document_99eddbbc11ec831e:a.C4,__wbg_getElementById_f83c5de20dc455d6:a.HS,__wbg_error_8ff19d586a987aef:a.pt,__wbg_log_e8ba7b992c7ad0eb:a.kq,__wbg_instanceof_CanvasRenderingContext2d_405495bb0ea92c4f:a.nf,__wbg_setstrokeStyle_32540003cbfe210b:a.Ws,__wbg_setfillStyle_1d391c4891a6ec4d:a.T8,__wbg_setlineWidth_6f1b76036ab98bfc:a.U7,__wbg_beginPath_e040b5521d41f537:a.pv,__wbg_fill_b6e37fbbefb55ae0:a.In,__wbg_stroke_63664360a52ce7d1:a.M9,__wbg_arc_85205a36bd04df0a:a.u6,__wbg_fillRect_59b38b7e6f8d0717:a.hx,__wbg_strokeRect_469c3838c9d01537:a.z2,__wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef:a.KK,__wbg_setwidth_654d8adcd4979eed:a.k4,__wbg_setheight_2b662384bfacb65c:a.bx,__wbg_getContext_0c19ba5c037e057f:a.fi,__wbg_newnoargs_e23b458e372830de:a.TL,__wbg_call_ae78342adc33730a:a._3,__wbg_self_99737b4dcdf6f0d8:a.OF,__wbg_window_9b61fbbf3564c4fb:a.xB,__wbg_globalThis_8e275ef40caea3a3:a.KQ,__wbg_global_5de1e0f82bddcd27:a.vm,__wbg_buffer_7af23f65f6c64548:a.EF,__wbg_new_cc9018bd6f283b6f:a.cb,__wbg_set_f25e869e4565d2a2:a.Ip,__wbg_length_0acb1cf9bbaf8519:a.Oo,__wbg_newwithlength_8f0657faca9f1422:a.rC,__wbg_subarray_da527dbd24eafb6b:a.YN,__wbindgen_object_clone_ref:a.m_,__wbindgen_debug_string:a.fY,__wbindgen_throw:a.Or,__wbindgen_memory:a.oH}}),_()}catch(t){_(t)}}),1)}}]); +"use strict";(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(t,e,r)=>{r.a(t,(async(n,_)=>{try{r.d(e,{$L:()=>yt,AX:()=>Y,Ck:()=>R,HM:()=>it,J:()=>nt,Ji:()=>rt,KM:()=>L,LW:()=>Z,Ni:()=>ft,Nl:()=>G,Or:()=>St,Pc:()=>et,Rv:()=>K,SZ:()=>B,Sn:()=>mt,Tc:()=>lt,Tt:()=>S,VY:()=>V,Vf:()=>ut,XP:()=>P,YL:()=>pt,Z_:()=>Q,a2:()=>C,bB:()=>gt,bD:()=>st,bj:()=>xt,cE:()=>X,fP:()=>It,fY:()=>Nt,gW:()=>ht,h4:()=>W,i0:()=>N,iX:()=>J,ib:()=>Et,jp:()=>Tt,kH:()=>jt,l3:()=>ct,lA:()=>A,lB:()=>kt,m_:()=>Bt,o0:()=>F,oH:()=>Ot,oY:()=>$,qh:()=>bt,qz:()=>z,rh:()=>U,ri:()=>at,so:()=>ot,tI:()=>dt,ug:()=>H,v8:()=>tt,vc:()=>_t,wJ:()=>vt,wc:()=>E,wg:()=>D,yB:()=>wt});var a=r(657);t=r.hmd(t);var c=n([a]);a=(c.then?(await c)():c)[0];const o=new Array(32).fill(void 0);function i(t){return o[t]}o.push(void 0,null,!0,!1);let s=o.length;function u(t){t<36||(o[t]=s,s=t)}function l(t){const e=i(t);return u(t),e}let p=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();let d=new Uint8Array;function g(){return 0===d.byteLength&&(d=new Uint8Array(a.memory.buffer)),d}function b(t,e){return p.decode(g().subarray(t,t+e))}function h(t){s===o.length&&o.push(o.length+1);const e=s;return s=o[e],o[e]=t,e}function f(t){const e=typeof t;if("number"==e||"boolean"==e||null==t)return`${t}`;if("string"==e)return`"${t}"`;if("symbol"==e){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const e=t.length;let r="[";e>0&&(r+=f(t[0]));for(let n=1;n1))return toString.call(t);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:n}let w=0,m=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const y="function"==typeof m.encodeInto?function(t,e){return m.encodeInto(t,e)}:function(t,e){const r=m.encode(t);return e.set(r),{read:t.length,written:r.length}};function v(t,e,r){if(void 0===r){const r=m.encode(t),n=e(r.length);return g().subarray(n,n+r.length).set(r),w=r.length,n}let n=t.length,_=e(n);const a=g();let c=0;for(;c127)break;a[_+c]=e}if(c!==n){0!==c&&(t=t.slice(c)),_=r(_,n,n=c+3*t.length);const e=g().subarray(_+c,_+n);c+=y(t,e).written}return w=c,_}let T=new Int32Array;function k(){return 0===T.byteLength&&(T=new Int32Array(a.memory.buffer)),T}function I(t){return null==t}function x(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function E(){a.init_wasm()}function j(t,e){try{return t.apply(this,e)}catch(t){a.__wbindgen_exn_store(h(t))}}Object.freeze({Move:0,0:"Move",Jump:1,1:"Jump"});const B=Object.freeze({Black:0,0:"Black",White:1,1:"White"}),N=(Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"})),S=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"});class O{static __wrap(t){const e=Object.create(O.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_board_free(t)}get width(){return a.__wbg_get_board_width(this.ptr)>>>0}set width(t){a.__wbg_set_board_width(this.ptr,t)}get height(){return a.__wbg_get_board_height(this.ptr)>>>0}set height(t){a.__wbg_set_board_height(this.ptr,t)}get current_turn(){return a.__wbg_get_board_current_turn(this.ptr)>>>0}set current_turn(t){a.__wbg_set_board_current_turn(this.ptr,t)}cell(t){const e=a.board_cell(this.ptr,t);return M.__wrap(e)}set_cell(t,e){x(e,M);var r=e.ptr;e.ptr=0,a.board_set_cell(this.ptr,t,r)}grid_cell(t){x(t,U);var e=t.ptr;t.ptr=0;const r=a.board_grid_cell(this.ptr,e);return M.__wrap(r)}cell_index(t,e){return a.board_cell_index(this.ptr,t,e)>>>0}cell_idx(t){x(t,U);var e=t.ptr;return t.ptr=0,a.board_cell_idx(this.ptr,e)>>>0}board_index(t){const e=a.board_board_index(this.ptr,t);return U.__wrap(e)}can_move(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;return e.ptr=0,a.board_can_move(this.ptr,r,n)>>>0}validate_man_move(t,e,r){x(t,U);var n=t.ptr;t.ptr=0,x(e,U);var _=e.ptr;e.ptr=0,x(r,q);var c=r.ptr;return r.ptr=0,a.board_validate_man_move(this.ptr,n,_,c)>>>0}validate_king_move(t,e,r){x(t,U);var n=t.ptr;t.ptr=0,x(e,U);var _=e.ptr;e.ptr=0,x(r,q);var c=r.ptr;return r.ptr=0,a.board_validate_king_move(this.ptr,n,_,c)>>>0}jumpee_idx(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;return e.ptr=0,a.board_jumpee_idx(this.ptr,r,n)>>>0}cells(){return a.board_cells(this.ptr)}num_cells(){return a.board_num_cells(this.ptr)>>>0}num_pieces(){return a.board_num_pieces(this.ptr)>>>0}num_player(t){return a.board_num_player(this.ptr,t)>>>0}score(){return a.board_score(this.ptr)}cell_state(t){return a.board_cell_state(this.ptr,t)>>>0}apply_move(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;e.ptr=0;const _=a.board_apply_move(this.ptr,r,n);return O.__wrap(_)}apply_jump(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;e.ptr=0;const _=a.board_apply_jump(this.ptr,r,n);return O.__wrap(_)}king_row_idx(){return a.board_king_row_idx(this.ptr)>>>0}static validate_jumpee(t,e){x(t,M);var r=t.ptr;t.ptr=0,x(e,q);var n=e.ptr;return e.ptr=0,a.board_validate_jumpee(r,n)>>>0}static check_jumpee_team(t,e){x(t,q);var r=t.ptr;t.ptr=0,x(e,q);var n=e.ptr;return e.ptr=0,0!==a.board_check_jumpee_team(r,n)}constructor(t,e,r){const n=a.board_new(t,e,r);return O.__wrap(n)}static init_game(t,e){x(t,O);var r=t.ptr;t.ptr=0;const n=a.board_init_game(r,e);return O.__wrap(n)}}class U{static __wrap(t){const e=Object.create(U.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_brdidx_free(t)}get row(){return a.__wbg_get_brdidx_row(this.ptr)>>>0}set row(t){a.__wbg_set_brdidx_row(this.ptr,t)}get col(){return a.__wbg_get_brdidx_col(this.ptr)>>>0}set col(t){a.__wbg_set_brdidx_col(this.ptr,t)}constructor(t,e){const r=a.brdidx_from(t,e);return U.__wrap(r)}eq(t){return x(t,U),0!==a.brdidx_eq(this.ptr,t.ptr)}}class A{static __wrap(t){const e=Object.create(A.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_game_free(t)}get last_node_count(){return a.__wbg_get_game_last_node_count(this.ptr)>>>0}set last_node_count(t){a.__wbg_set_game_last_node_count(this.ptr,t)}get perfect_chance(){return a.__wbg_get_game_perfect_chance(this.ptr)}set perfect_chance(t){a.__wbg_set_game_perfect_chance(this.ptr,t)}current_board_cells(){return a.game_current_board_cells(this.ptr)}current_board_len(){return a.game_current_board_len(this.ptr)>>>0}current_turn(){return a.game_current_turn(this.ptr)>>>0}score(){return a.game_score(this.ptr)}winning(){const t=a.game_winning(this.ptr);return 2===t?void 0:t}has_won(){const t=a.game_has_won(this.ptr);return 2===t?void 0:t}current_cell_state(t){x(t,U);const e=a.game_current_cell_state(this.ptr,t.ptr);return M.__wrap(e)}set_search_depth(t){a.game_set_search_depth(this.ptr,t)}set_selected(t){x(t,U),a.game_set_selected(this.ptr,t.ptr)}set_perfect_chance(t){a.game_set_perfect_chance(this.ptr,t)}clear_selected(){a.game_clear_selected(this.ptr)}make_move(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;return e.ptr=0,a.game_make_move(this.ptr,r,n)>>>0}execute_move(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;e.ptr=0,a.game_execute_move(this.ptr,r,n)}execute_jump(t,e){x(t,U);var r=t.ptr;t.ptr=0,x(e,U);var n=e.ptr;e.ptr=0,a.game_execute_jump(this.ptr,r,n)}push_new_board(t){x(t,O);var e=t.ptr;t.ptr=0,a.game_push_new_board(this.ptr,e)}set_current(t){x(t,O);var e=t.ptr;t.ptr=0,a.game_set_current(this.ptr,e)}constructor(t,e,r,n,_){const c=a.game_new(t,e,r,n,_);return A.__wrap(c)}static new_with_canvas(t,e,r,n,_,c,o,i){const s=v(c,a.__wbindgen_malloc,a.__wbindgen_realloc),u=w,l=a.game_new_with_canvas(t,e,r,n,_,s,u,o,i);return A.__wrap(l)}set_painter(t){x(t,R);var e=t.ptr;t.ptr=0,a.game_set_painter(this.ptr,e)}draw(){a.game_draw(this.ptr)}ai_move(){a.game_ai_move(this.ptr)}}class R{static __wrap(t){const e=Object.create(R.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_painter_free(t)}constructor(t,e,r){const n=v(r,a.__wbindgen_malloc,a.__wbindgen_realloc),_=w,c=a.painter_new(t,e,n,_);return R.__wrap(c)}static new_with_canvas(t,e,r){const n=a.painter_new_with_canvas(t,e,h(r));return R.__wrap(n)}set_square_outline(t){a.painter_set_square_outline(this.ptr,h(t))}set_outline_width(t){a.painter_set_outline_width(this.ptr,t)}set_draw_outline(t){a.painter_set_draw_outline(this.ptr,t)}reset_dimensions(){a.painter_reset_dimensions(this.ptr)}validate_board_dim(t){return x(t,O),0!==a.painter_validate_board_dim(this.ptr,t.ptr)}draw(t){x(t,O),a.painter_draw(this.ptr,t.ptr)}}class q{static __wrap(t){const e=Object.create(q.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_piece_free(t)}get team(){return a.__wbg_get_piece_team(this.ptr)>>>0}set team(t){a.__wbg_set_piece_team(this.ptr,t)}get strength(){return a.__wbg_get_piece_strength(this.ptr)>>>0}set strength(t){a.__wbg_set_piece_strength(this.ptr,t)}constructor(t,e){const r=a.piece_new(t,e);return q.__wrap(r)}}class M{static __wrap(t){const e=Object.create(M.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_square_free(t)}get occupant(){const t=a.__wbg_get_square_occupant(this.ptr);return 0===t?void 0:q.__wrap(t)}set occupant(t){let e=0;I(t)||(x(t,q),e=t.ptr,t.ptr=0),a.__wbg_set_square_occupant(this.ptr,e)}get state(){return a.__wbg_get_square_state(this.ptr)>>>0}set state(t){a.__wbg_set_square_state(this.ptr,t)}constructor(t,e){let r=0;I(e)||(x(e,q),r=e.ptr,e.ptr=0);const n=a.square_new(t,r);return M.__wrap(n)}static pc(t,e){const r=a.square_pc(t,e);return M.__wrap(r)}static empty(){const t=a.square_empty();return M.__wrap(t)}static unplay(){const t=a.square_unplay();return M.__wrap(t)}}function H(t){l(t)}function W(t,e){return h(b(t,e))}function C(){return h(new Error)}function L(t,e){const r=v(i(e).stack,a.__wbindgen_malloc,a.__wbindgen_realloc),n=w;k()[t/4+1]=n,k()[t/4+0]=r}function J(t,e){try{console.error(b(t,e))}finally{a.__wbindgen_free(t,e)}}function $(){return j((function(){return h(self.self)}),arguments)}function D(t){return h(i(t).crypto)}function Y(t){return h(i(t).msCrypto)}function P(t){return void 0===i(t)}function Z(t,e,r){return h(i(t).require(b(e,r)))}function K(t){return h(i(t).getRandomValues)}function F(t,e){i(t).getRandomValues(i(e))}function V(t,e,r){var n,_;i(t).randomFillSync((n=e,_=r,g().subarray(n/1,n/1+_)))}function z(){return h(t)}function X(t){let e;try{e=i(t)instanceof Window}catch{e=!1}return e}function G(t){const e=i(t).document;return I(e)?0:h(e)}function Q(t,e,r){const n=i(t).getElementById(b(e,r));return I(n)?0:h(n)}function tt(t){console.error(i(t))}function et(t){console.log(i(t))}function rt(t){let e;try{e=i(t)instanceof CanvasRenderingContext2D}catch{e=!1}return e}function nt(t,e){i(t).strokeStyle=i(e)}function _t(t,e){i(t).fillStyle=i(e)}function at(t,e){i(t).lineWidth=e}function ct(t){i(t).beginPath()}function ot(t){i(t).fill()}function it(t){i(t).stroke()}function st(){return j((function(t,e,r,n,_,a){i(t).arc(e,r,n,_,a)}),arguments)}function ut(t,e,r,n,_){i(t).fillRect(e,r,n,_)}function lt(t,e,r,n,_){i(t).strokeRect(e,r,n,_)}function pt(t){let e;try{e=i(t)instanceof HTMLCanvasElement}catch{e=!1}return e}function dt(t,e){i(t).width=e>>>0}function gt(t,e){i(t).height=e>>>0}function bt(){return j((function(t,e,r){const n=i(t).getContext(b(e,r));return I(n)?0:h(n)}),arguments)}function ht(t,e){return h(new Function(b(t,e)))}function ft(){return j((function(t,e){return h(i(t).call(i(e)))}),arguments)}function wt(){return j((function(){return h(self.self)}),arguments)}function mt(){return j((function(){return h(window.window)}),arguments)}function yt(){return j((function(){return h(globalThis.globalThis)}),arguments)}function vt(){return j((function(){return h(r.g.global)}),arguments)}function Tt(t){return h(i(t).buffer)}function kt(t){return h(new Uint8Array(i(t)))}function It(t,e,r){i(t).set(i(e),r>>>0)}function xt(t){return i(t).length}function Et(t){return h(new Uint8Array(t>>>0))}function jt(t,e,r){return h(i(t).subarray(e>>>0,r>>>0))}function Bt(t){return h(i(t))}function Nt(t,e){const r=v(f(i(e)),a.__wbindgen_malloc,a.__wbindgen_realloc),n=w;k()[t/4+1]=n,k()[t/4+0]=r}function St(t,e){throw new Error(b(t,e))}function Ot(){return h(a.memory)}_()}catch(Ut){_(Ut)}}))},10:(t,e,r)=>{r.a(t,(async(t,n)=>{try{r.r(e);var _=r(171),a=t([_]);_=(a.then?(await a)():a)[0];const l=720,p=720;var c=8,o=8,i=3,s=4,u=.5;const d=3e3,g=3e3,b={HUMAN_TURN:{THINKING:"human_turn.thinking",FROM_SELECTED:"human_turn.from_selected"},AI_TURN:"ai_turn"};(0,_.wc)(),document.getElementById("status-p");const h=document.getElementById("status-d"),f=document.getElementById("team-p"),w=document.getElementById("node-count"),m=document.getElementById("winning-p");document.getElementById("startBtn").onclick=B;let y=null,v=null,T=O,k=b.HUMAN_TURN.THINKING,I=null,x=null,E=[];B();const j=document.getElementById("game-canvas");function B(){I=new _.lA(c,o,i,_.SZ.Black,s),x=new _.Ck(l,p,"game-canvas"),I.set_painter(x),I.draw(),clearInterval(y),U(),A(),E=[],k=b.HUMAN_TURN.THINKING}function N(t){switch(k){case b.HUMAN_TURN.THINKING:if(I.current_cell_state(t).state!=_.i0.Occupied)return;if(I.current_cell_state(t).occupant.team!=I.current_turn())return;E.push(t),k=b.HUMAN_TURN.FROM_SELECTED,I.set_selected(t),I.draw();break;case b.HUMAN_TURN.FROM_SELECTED:if(!E[0].eq(t)){if(I.current_cell_state(t).state!=_.i0.Empty)return;if(E.push(t),2!=E.length)return T(`Error: wrong number of clicks to process ${E.length}`),void console.error(`Error: wrong number of clicks to process ${E.length}`);switch(I.make_move(E[0],E[1])){case _.Tt.Allowed:if(D.checked&&void 0===I.has_won()){let t=performance.now();I.ai_move();let e=performance.now();w.innerText=`searched ${I.last_node_count.toLocaleString("en-GB")} possible moves in ${(e-t).toLocaleString()}ms`}break;case _.Tt.IllegalTrajectory:T("You can't move like that!");break;case _.Tt.JumpingSameTeam:T("You can't jump your own piece!");break;case _.Tt.NoJumpablePiece:T("There's nothing to jump!");break;case _.Tt.OccupiedDest:T("There's a piece there!");break;case _.Tt.OutOfBounds:T("That square's not on the board! (how have you managed that?)");break;case _.Tt.UnoccupiedSrc:T("There's no piece to move!");break;case _.Tt.Unplayable:T("That's not a playable square!");break;case _.Tt.WrongTeamSrc:T("That's not your piece!")}}I.clear_selected(),I.draw(),E=[],k=b.HUMAN_TURN.THINKING;break;case b.AI_TURN:console.log("It's the AI's turn!")}U(),A(),R()}function S(t,e){var r=t.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}function O(t,e="danger",r=!0){null!=v&&clearInterval(v),h.className=`alert alert-${e}`,h.innerText=t,h.hidden=!1,r&&(v=setTimeout((()=>{h.hidden=!0}),d))}function U(){switch(I.current_turn()){case _.SZ.White:f.innerText="⚪ White ⚪";break;case _.SZ.Black:f.innerText="🔴 Black 🔴"}}function A(){switch(I.winning()){case void 0:m.innerText="";break;case _.SZ.White:m.innerText="👑 White 👑";break;case _.SZ.Black:m.innerText="👑 Black 👑"}}function R(){switch(I.has_won()){case void 0:break;case _.SZ.White:T("You Lost!"),y=setInterval((()=>{B()}),g);break;case _.SZ.Black:T("You Won!","success"),y=setInterval((()=>{B()}),g)}}j.addEventListener("click",(t=>{var e=S(j,t);N(new _.rh(Math.floor(e.y/j.clientHeight*o),Math.floor(e.x/j.clientWidth*c)))}));const q=document.getElementById("width"),M=()=>{c=parseInt(q.value),B()};q.onchange=M,q.value=8;const H=document.getElementById("height"),W=()=>{o=parseInt(H.value),C.max=o/2-1,B()};H.onchange=W,H.value=8;const C=document.getElementById("play_rows"),L=()=>{i=parseInt(C.value),B()};C.onchange=L,C.value=3;const J=document.getElementById("ai_search_depth"),$=()=>{s=parseInt(J.value),I.set_search_depth(s),s>4&&T("This increases thinking time exponentially, be careful (probably don't go past 6)","warning")};J.onchange=$,J.value=4;const D=document.getElementById("ai-checkbox"),Y=()=>{};D.onchange=Y;const P=document.getElementById("ai_difficulty"),Z=()=>{u=parseInt(P.value)/100,I.set_perfect_chance(u)};P.onchange=Z,P.value=50,n()}catch(K){n(K)}}))},657:(t,e,r)=>{r.a(t,(async(n,_)=>{try{var a,c=n([a=r(171)]),[a]=c.then?(await c)():c;await r.v(e,t.id,"8a5d34b545c8f059a042",{"./draught_bg.js":{__wbindgen_object_drop_ref:a.ug,__wbindgen_string_new:a.h4,__wbg_new_abda76e883ba8a5f:a.a2,__wbg_stack_658279fe44541cf6:a.KM,__wbg_error_f851667af71bcfc6:a.iX,__wbg_self_7eede1f4488bf346:a.oY,__wbg_crypto_c909fb428dcbddb6:a.wg,__wbg_msCrypto_511eefefbfc70ae4:a.AX,__wbindgen_is_undefined:a.XP,__wbg_require_900d5c3984fe7703:a.LW,__wbg_getRandomValues_307049345d0bd88c:a.Rv,__wbg_getRandomValues_cd175915511f705e:a.o0,__wbg_randomFillSync_85b3f4c52c56c313:a.VY,__wbg_static_accessor_MODULE_ef3aa2eb251158a5:a.qz,__wbg_instanceof_Window_acc97ff9f5d2c7b4:a.cE,__wbg_document_3ead31dbcad65886:a.Nl,__wbg_getElementById_3a708b83e4f034d7:a.Z_,__wbg_error_ef9a0be47931175f:a.v8,__wbg_log_4b5638ad60bdc54a:a.Pc,__wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622:a.Ji,__wbg_setstrokeStyle_899ea3720dae323b:a.J,__wbg_setfillStyle_53ccf2a9886c1c4d:a.vc,__wbg_setlineWidth_64004648773fed7a:a.ri,__wbg_beginPath_4e91b7092d0d33d9:a.l3,__wbg_fill_8ec436f419a0d161:a.so,__wbg_stroke_85dee7d87c4a6ead:a.HM,__wbg_arc_30e550c408f151ac:a.bD,__wbg_fillRect_c7a19e13c5242507:a.Vf,__wbg_strokeRect_972fbfb664182aea:a.Tc,__wbg_instanceof_HtmlCanvasElement_97761617af6ea089:a.YL,__wbg_setwidth_afb418d3fbf71ba7:a.tI,__wbg_setheight_3eb8729b59493242:a.bB,__wbg_getContext_4d5e97892c1b206a:a.qh,__wbg_newnoargs_b5b063fc6c2f0376:a.gW,__wbg_call_97ae9d8645dc388b:a.Ni,__wbg_self_6d479506f72c6a71:a.yB,__wbg_window_f2557cc78490aceb:a.Sn,__wbg_globalThis_7f206bda628d5286:a.$L,__wbg_global_ba75c50d1cf384f4:a.wJ,__wbg_buffer_3f3d764d4747d564:a.jp,__wbg_new_8c3f0052272a457a:a.lB,__wbg_set_83db9690f9353e79:a.fP,__wbg_length_9e1ae1900cb0fbd5:a.bj,__wbg_newwithlength_f5933855e4f48a19:a.ib,__wbg_subarray_58ad4efbb5bcb886:a.kH,__wbindgen_object_clone_ref:a.m_,__wbindgen_debug_string:a.fY,__wbindgen_throw:a.Or,__wbindgen_memory:a.oH}}),_()}catch(t){_(t)}}),1)}}]); //# sourceMappingURL=10.bootstrap.js.map \ No newline at end of file diff --git a/10.bootstrap.js.map b/10.bootstrap.js.map index 1e3dce0..a14c131 100644 --- a/10.bootstrap.js.map +++ b/10.bootstrap.js.map @@ -1 +1 @@ -{"version":3,"file":"10.bootstrap.js","mappings":"ytBAEA,MAAMA,EAAO,IAAIC,MAAM,IAAIC,UAAKC,GAIhC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,EAAM,CAF5CL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EAAKQ,OAErB,SAASC,EAAWJ,GACZA,EAAM,KACVL,EAAKK,GAAOE,EACZA,EAAYF,EAChB,CAEA,SAASK,EAAWL,GAChB,MAAMM,EAAMP,EAAUC,GAEtB,OADAI,EAAWJ,GACJM,CACX,CAIA,IAAIC,EAAoB,IAFoB,oBAAhBC,aAA8B,EAAIC,EAAOC,SAAS,QAAQF,YAAcA,aAE3D,QAAS,CAAEG,WAAW,EAAMC,OAAO,IAE5EL,EAAkBM,SAElB,IAAIC,EAAuB,KAC3B,SAASC,IAIL,OAH6B,OAAzBD,GAAiCA,EAAqBE,SAAW,kBACjEF,EAAuB,IAAIG,WAAW,kBAEnCH,CACX,CAEA,SAASI,EAAmBC,EAAKC,GAC7B,OAAOb,EAAkBM,OAAOE,IAAkBM,SAASF,EAAKA,EAAMC,GAC1E,CAEA,SAASE,EAAcC,GACfrB,IAAcP,EAAKQ,QAAQR,EAAKM,KAAKN,EAAKQ,OAAS,GACvD,MAAMH,EAAME,EAIZ,OAHAA,EAAYP,EAAKK,GAEjBL,EAAKK,GAAOuB,EACLvB,CACX,CAEA,SAASwB,EAAYC,GAEjB,MAAMC,SAAcD,EACpB,GAAY,UAARC,GAA4B,WAARA,GAA4B,MAAPD,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C6H,EAAc,KAEhBpE,EAAa8D,SAASI,EAAarK,OACnCkH,GAAY,EAEhBmD,EAAaH,SAAWK,EACxBF,EAAarK,MAAQ,EAErB,MAAMwK,EAAmBhI,SAASE,eAAe,mBAI3C+H,EAAkB,KAEpBrE,EAAe6D,SAASO,EAAiBxK,OACzCwH,EAAKzI,iBAAiBqH,GAEnBA,EAAe,GACdiB,EAAU,oFAAqF,UACnG,EAEJmD,EAAiBN,SAAWO,EAC5BD,EAAiBxK,MAAQ,EAEzB,MAAMgI,EAAaxF,SAASE,eAAe,eAIrCgI,EAAY,OAGlB1C,EAAWkC,SAAWQ,EAGtB,MAAMC,EAAkBnI,SAASE,eAAe,iBAI1CkI,EAAkB,KAEpBvE,EAAiB4D,SAASU,EAAgB3K,OAAS,IACnDwH,EAAKtI,mBAAmBmH,EAAe,EAE3CsE,EAAgBT,SAAWU,EAC3BD,EAAgB3K,MAAQ,G","sources":["webpack://draught/../pkg/draught_bg.js","webpack://draught/./index.js"],"sourcesContent":["import * as wasm from './draught_bg.wasm';\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;\n\nlet cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachegetUint8Memory0 = null;\nfunction getUint8Memory0() {\n if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {\n cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachegetUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;\n\nlet cachedTextEncoder = new lTextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length);\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len);\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3);\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachegetInt32Memory0 = null;\nfunction getInt32Memory0() {\n if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {\n cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachegetInt32Memory0;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n*/\nexport function init_wasm() {\n wasm.init_wasm();\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* Move/Jump, for use in Move\n*/\nexport const MoveType = Object.freeze({ Move:0,\"0\":\"Move\",Jump:1,\"1\":\"Jump\", });\n/**\n* Black/White\n*/\nexport const Team = Object.freeze({ Black:0,\"0\":\"Black\",White:1,\"1\":\"White\", });\n/**\n* Man/King\n*/\nexport const Strength = Object.freeze({ Man:0,\"0\":\"Man\",King:1,\"1\":\"King\", });\n/**\n* Model board square as Empty/Occupied/Unplayable\n*/\nexport const SquareState = Object.freeze({ Empty:0,\"0\":\"Empty\",Occupied:1,\"1\":\"Occupied\",Unplayable:2,\"2\":\"Unplayable\", });\n/**\n* Possible outcomes of trying to move\n*/\nexport const Moveable = 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\", });\n/**\n* Single state of a checkers board\n*/\nexport class Board {\n\n static __wrap(ptr) {\n const obj = Object.create(Board.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_board_free(ptr);\n }\n /**\n */\n get width() {\n const ret = wasm.__wbg_get_board_width(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set width(arg0) {\n wasm.__wbg_set_board_width(this.ptr, arg0);\n }\n /**\n */\n get height() {\n const ret = wasm.__wbg_get_board_height(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set height(arg0) {\n wasm.__wbg_set_board_height(this.ptr, arg0);\n }\n /**\n */\n get current_turn() {\n const ret = wasm.__wbg_get_board_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set current_turn(arg0) {\n wasm.__wbg_set_board_current_turn(this.ptr, arg0);\n }\n /**\n * Get a copy of a board square by 1D array index\n * @param {number} idx\n * @returns {Square}\n */\n cell(idx) {\n const ret = wasm.board_cell(this.ptr, idx);\n return Square.__wrap(ret);\n }\n /**\n * Get a copy of a board square by 1D array index\n * @param {number} idx\n * @param {Square} square\n */\n set_cell(idx, square) {\n _assertClass(square, Square);\n var ptr0 = square.ptr;\n square.ptr = 0;\n wasm.board_set_cell(this.ptr, idx, ptr0);\n }\n /**\n * Get a copy of a board square by 2D [`BrdIdx`] index\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n grid_cell(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n const ret = wasm.board_grid_cell(this.ptr, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * Transform a 2D row/column board index into a single 1D index for use with [`Board::cells`]\n * @param {number} row\n * @param {number} col\n * @returns {number}\n */\n cell_index(row, col) {\n const ret = wasm.board_cell_index(this.ptr, row, col);\n return ret >>> 0;\n }\n /**\n * Similar to [`Board::cell_index`] but with a [`BrdIdx`] instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with [`Board::cells`]\n * @param {BrdIdx} idx\n * @returns {number}\n */\n cell_idx(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n const ret = wasm.board_cell_idx(this.ptr, ptr0);\n return ret >>> 0;\n }\n /**\n * Transform a 1D array index (for [`Board::cells`]) into a 2D game board index (by row/col)\n * @param {number} idx\n * @returns {BrdIdx}\n */\n board_index(idx) {\n const ret = wasm.board_board_index(this.ptr, idx);\n return BrdIdx.__wrap(ret);\n }\n /**\n * Check whether a move given by source and destination indices is legal\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n can_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_can_move(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Check that given move trajectory is valid for a man piece\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @param {Piece} from_square_occupant\n * @returns {number}\n */\n validate_man_move(from, to, from_square_occupant) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n _assertClass(from_square_occupant, Piece);\n var ptr2 = from_square_occupant.ptr;\n from_square_occupant.ptr = 0;\n const ret = wasm.board_validate_man_move(this.ptr, ptr0, ptr1, ptr2);\n return ret >>> 0;\n }\n /**\n * Check that given move trajectory is valid for a king piece\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @param {Piece} from_square_occupant\n * @returns {number}\n */\n validate_king_move(from, to, from_square_occupant) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n _assertClass(from_square_occupant, Piece);\n var ptr2 = from_square_occupant.ptr;\n from_square_occupant.ptr = 0;\n const ret = wasm.board_validate_king_move(this.ptr, ptr0, ptr1, ptr2);\n return ret >>> 0;\n }\n /**\n * Get cell index of jumpee square given from and to locations\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n jumpee_idx(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_jumpee_idx(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Get a pointer to the backing array of board squares, [`Board::cells`]\n * @returns {number}\n */\n cells() {\n const ret = wasm.board_cells(this.ptr);\n return ret;\n }\n /**\n * Get the number of board squares\n * @returns {number}\n */\n num_cells() {\n const ret = wasm.board_num_cells(this.ptr);\n return ret >>> 0;\n }\n /**\n * Get the number of remaining pieces\n * @returns {number}\n */\n num_pieces() {\n const ret = wasm.board_num_pieces(this.ptr);\n return ret >>> 0;\n }\n /**\n * Get the number of remaining pieces for a player\n * @param {number} team\n * @returns {number}\n */\n num_player(team) {\n const ret = wasm.board_num_player(this.ptr, team);\n return ret >>> 0;\n }\n /**\n * Get the score value, Black - White pieces\n * @returns {number}\n */\n score() {\n const ret = wasm.board_score(this.ptr);\n return ret;\n }\n /**\n * Get the state of a board square by 1D array index\n * @param {number} idx\n * @returns {number}\n */\n cell_state(idx) {\n const ret = wasm.board_cell_state(this.ptr, idx);\n return ret >>> 0;\n }\n /**\n * Get new board derived from current with given move applied\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {Board}\n */\n apply_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_apply_move(this.ptr, ptr0, ptr1);\n return Board.__wrap(ret);\n }\n /**\n * Get new board derived from current with given jump applied\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {Board}\n */\n apply_jump(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_apply_jump(this.ptr, ptr0, ptr1);\n return Board.__wrap(ret);\n }\n /**\n * Get row index for current team, top row for black, bottom row for white\n * @returns {number}\n */\n king_row_idx() {\n const ret = wasm.board_king_row_idx(this.ptr);\n return ret >>> 0;\n }\n /**\n * Unwrap the jumpee piece from the square and [`Board::check_jumpee_team`] with [`Moveable`] response\n * @param {Square} jumpee\n * @param {Piece} from_occ\n * @returns {number}\n */\n static validate_jumpee(jumpee, from_occ) {\n _assertClass(jumpee, Square);\n var ptr0 = jumpee.ptr;\n jumpee.ptr = 0;\n _assertClass(from_occ, Piece);\n var ptr1 = from_occ.ptr;\n from_occ.ptr = 0;\n const ret = wasm.board_validate_jumpee(ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Check that the source piece and the jumpee are of opposing teams\n * @param {Piece} from\n * @param {Piece} jumpee\n * @returns {boolean}\n */\n static check_jumpee_team(from, jumpee) {\n _assertClass(from, Piece);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(jumpee, Piece);\n var ptr1 = jumpee.ptr;\n jumpee.ptr = 0;\n const ret = wasm.board_check_jumpee_team(ptr0, ptr1);\n return ret !== 0;\n }\n /**\n * Initialise a game board without game pieces\n * @param {number} width\n * @param {number} height\n * @param {number} current_turn\n */\n constructor(width, height, current_turn) {\n const ret = wasm.board_new(width, height, current_turn);\n return Board.__wrap(ret);\n }\n /**\n * Reset the given board to a starting layout with 3 rows of opposing pieces\n * @param {Board} board\n * @param {number} piece_rows\n * @returns {Board}\n */\n static init_game(board, piece_rows) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n const ret = wasm.board_init_game(ptr0, piece_rows);\n return Board.__wrap(ret);\n }\n}\n/**\n* Rank 2 tensor index to identify a board square by row and column\n*/\nexport class BrdIdx {\n\n static __wrap(ptr) {\n const obj = Object.create(BrdIdx.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_brdidx_free(ptr);\n }\n /**\n */\n get row() {\n const ret = wasm.__wbg_get_brdidx_row(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set row(arg0) {\n wasm.__wbg_set_brdidx_row(this.ptr, arg0);\n }\n /**\n */\n get col() {\n const ret = wasm.__wbg_get_brdidx_col(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set col(arg0) {\n wasm.__wbg_set_brdidx_col(this.ptr, arg0);\n }\n /**\n * @param {number} row\n * @param {number} col\n */\n constructor(row, col) {\n const ret = wasm.brdidx_from(row, col);\n return BrdIdx.__wrap(ret);\n }\n /**\n * @param {BrdIdx} other\n * @returns {boolean}\n */\n eq(other) {\n _assertClass(other, BrdIdx);\n const ret = wasm.brdidx_eq(this.ptr, other.ptr);\n return ret !== 0;\n }\n}\n/**\n* Root-level structure for managing the game as a collection of board states\n*/\nexport class Game {\n\n static __wrap(ptr) {\n const obj = Object.create(Game.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_game_free(ptr);\n }\n /**\n */\n get last_node_count() {\n const ret = wasm.__wbg_get_game_last_node_count(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set last_node_count(arg0) {\n wasm.__wbg_set_game_last_node_count(this.ptr, arg0);\n }\n /**\n */\n get perfect_chance() {\n const ret = wasm.__wbg_get_game_perfect_chance(this.ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set perfect_chance(arg0) {\n wasm.__wbg_set_game_perfect_chance(this.ptr, arg0);\n }\n /**\n * Get pointer to current board's squares\n * @returns {number}\n */\n current_board_cells() {\n const ret = wasm.game_current_board_cells(this.ptr);\n return ret;\n }\n /**\n * Get pointer to current board's squares\n * @returns {number}\n */\n current_board_len() {\n const ret = wasm.game_current_board_len(this.ptr);\n return ret >>> 0;\n }\n /**\n * Current turn's team\n * @returns {number}\n */\n current_turn() {\n const ret = wasm.game_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * Current board's score\n * @returns {number}\n */\n score() {\n const ret = wasm.game_score(this.ptr);\n return ret;\n }\n /**\n * Get currently winning player\n * @returns {number | undefined}\n */\n winning() {\n const ret = wasm.game_winning(this.ptr);\n return ret === 2 ? undefined : ret;\n }\n /**\n * Check if a player has won\n * @returns {number | undefined}\n */\n has_won() {\n const ret = wasm.game_has_won(this.ptr);\n return ret === 2 ? undefined : ret;\n }\n /**\n * Get square on current board for given index\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n current_cell_state(idx) {\n _assertClass(idx, BrdIdx);\n const ret = wasm.game_current_cell_state(this.ptr, idx.ptr);\n return Square.__wrap(ret);\n }\n /**\n * Set tree depth for AI to search to\n * @param {number} search_depth\n */\n set_search_depth(search_depth) {\n wasm.game_set_search_depth(this.ptr, search_depth);\n }\n /**\n * Set given index as selected piece\n * TODO: Check whether valid square?\n * @param {BrdIdx} idx\n */\n set_selected(idx) {\n _assertClass(idx, BrdIdx);\n wasm.game_set_selected(this.ptr, idx.ptr);\n }\n /**\n * Set proportion of perfect moves from AI\n * @param {number} new_chance\n */\n set_perfect_chance(new_chance) {\n wasm.game_set_perfect_chance(this.ptr, new_chance);\n }\n /**\n * Clear currently selected piece\n */\n clear_selected() {\n wasm.game_clear_selected(this.ptr);\n }\n /**\n * Attempt to make a move given a source and destination index\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n make_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.game_make_move(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Update board state with given move and push new board into current state\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n */\n execute_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n wasm.game_execute_move(this.ptr, ptr0, ptr1);\n }\n /**\n * Update board state with given jump move and push new board into current state\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n */\n execute_jump(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n wasm.game_execute_jump(this.ptr, ptr0, ptr1);\n }\n /**\n * Push current board into the previous turns and set given board to current\n * @param {Board} board\n */\n push_new_board(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n wasm.game_push_new_board(this.ptr, ptr0);\n }\n /**\n * Set current board to given\n * @param {Board} board\n */\n set_current(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n wasm.game_set_current(this.ptr, ptr0);\n }\n /**\n * Get new game without board renderer\n * @param {number} width\n * @param {number} height\n * @param {number} piece_rows\n * @param {number} first_turn\n * @param {number} search_depth\n */\n constructor(width, height, piece_rows, first_turn, search_depth) {\n const ret = wasm.game_new(width, height, piece_rows, first_turn, search_depth);\n return Game.__wrap(ret);\n }\n /**\n * Get a new game with canvas ID and dimensions\n * @param {number} width\n * @param {number} height\n * @param {number} piece_rows\n * @param {number} first_turn\n * @param {number} search_depth\n * @param {string} canvas_id\n * @param {number} canvas_width\n * @param {number} canvas_height\n * @returns {Game}\n */\n static new_with_canvas(width, height, piece_rows, first_turn, search_depth, canvas_id, canvas_width, canvas_height) {\n const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.game_new_with_canvas(width, height, piece_rows, first_turn, search_depth, ptr0, len0, canvas_width, canvas_height);\n return Game.__wrap(ret);\n }\n /**\n * Set painter for rendering boards\n * @param {Painter} value\n */\n set_painter(value) {\n _assertClass(value, Painter);\n var ptr0 = value.ptr;\n value.ptr = 0;\n wasm.game_set_painter(this.ptr, ptr0);\n }\n /**\n * Draw current board using painter if exists\n */\n draw() {\n wasm.game_draw(this.ptr);\n }\n /**\n * Create computer, get move from current board and update current board\n */\n ai_move() {\n wasm.game_ai_move(this.ptr);\n }\n}\n/**\n* Used to paint boards onto HTML canvases\n*/\nexport class Painter {\n\n static __wrap(ptr) {\n const obj = Object.create(Painter.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_painter_free(ptr);\n }\n /**\n * Default constructor which queries for canvas by ID\n * @param {number} width\n * @param {number} height\n * @param {string} canvas_id\n */\n constructor(width, height, canvas_id) {\n const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.painter_new(width, height, ptr0, len0);\n return Painter.__wrap(ret);\n }\n /**\n * Constructor with given canvas element\n * @param {number} width\n * @param {number} height\n * @param {HTMLCanvasElement} canvas\n * @returns {Painter}\n */\n static new_with_canvas(width, height, canvas) {\n const ret = wasm.painter_new_with_canvas(width, height, addHeapObject(canvas));\n return Painter.__wrap(ret);\n }\n /**\n * Set new square outline colour value\n * @param {any} value\n */\n set_square_outline(value) {\n wasm.painter_set_square_outline(this.ptr, addHeapObject(value));\n }\n /**\n * Set new line width for outlining squares\n * @param {number} value\n */\n set_outline_width(value) {\n wasm.painter_set_outline_width(this.ptr, value);\n }\n /**\n * Set whether squares are outlined\n * @param {boolean} value\n */\n set_draw_outline(value) {\n wasm.painter_set_draw_outline(this.ptr, value);\n }\n /**\n * Reset the canvas dimensions to the given width and height\n */\n reset_dimensions() {\n wasm.painter_reset_dimensions(this.ptr);\n }\n /**\n * Check whether given canvas dimensions divide evenly by given board dimenions\n * @param {Board} board\n * @returns {boolean}\n */\n validate_board_dim(board) {\n _assertClass(board, Board);\n const ret = wasm.painter_validate_board_dim(this.ptr, board.ptr);\n return ret !== 0;\n }\n /**\n * Draw a board onto the canvas\n * @param {Board} board\n */\n draw(board) {\n _assertClass(board, Board);\n wasm.painter_draw(this.ptr, board.ptr);\n }\n}\n/**\n* Game piece given by its team and strength (normal or kinged)\n*/\nexport class Piece {\n\n static __wrap(ptr) {\n const obj = Object.create(Piece.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_piece_free(ptr);\n }\n /**\n */\n get team() {\n const ret = wasm.__wbg_get_piece_team(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set team(arg0) {\n wasm.__wbg_set_piece_team(this.ptr, arg0);\n }\n /**\n */\n get strength() {\n const ret = wasm.__wbg_get_piece_strength(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set strength(arg0) {\n wasm.__wbg_set_piece_strength(this.ptr, arg0);\n }\n /**\n * @param {number} team\n * @param {number} strength\n */\n constructor(team, strength) {\n const ret = wasm.piece_new(team, strength);\n return Piece.__wrap(ret);\n }\n}\n/**\n* Board squares given by a state and a possible occupying game piece\n*/\nexport class Square {\n\n static __wrap(ptr) {\n const obj = Object.create(Square.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_square_free(ptr);\n }\n /**\n * Game piece if square is occupied\n */\n get occupant() {\n const ret = wasm.__wbg_get_square_occupant(this.ptr);\n return ret === 0 ? undefined : Piece.__wrap(ret);\n }\n /**\n * Game piece if square is occupied\n * @param {Piece | undefined} arg0\n */\n set occupant(arg0) {\n let ptr0 = 0;\n if (!isLikeNone(arg0)) {\n _assertClass(arg0, Piece);\n ptr0 = arg0.ptr;\n arg0.ptr = 0;\n }\n wasm.__wbg_set_square_occupant(this.ptr, ptr0);\n }\n /**\n * Description of whether the square is occupied or an unplayable, i.e. off-lattice square\n */\n get state() {\n const ret = wasm.__wbg_get_square_state(this.ptr);\n return ret >>> 0;\n }\n /**\n * Description of whether the square is occupied or an unplayable, i.e. off-lattice square\n * @param {number} arg0\n */\n set state(arg0) {\n wasm.__wbg_set_square_state(this.ptr, arg0);\n }\n /**\n * Standard constructor function to form square from state and occupant\n * @param {number} state\n * @param {Piece | undefined} occupant\n */\n constructor(state, occupant) {\n let ptr0 = 0;\n if (!isLikeNone(occupant)) {\n _assertClass(occupant, Piece);\n ptr0 = occupant.ptr;\n occupant.ptr = 0;\n }\n const ret = wasm.square_new(state, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed piece square by team and strength\n * @param {number} team\n * @param {number} strength\n * @returns {Square}\n */\n static pc(team, strength) {\n const ret = wasm.square_pc(team, strength);\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed empty square\n * @returns {Square}\n */\n static empty() {\n const ret = wasm.square_empty();\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed unplayable square\n * @returns {Square}\n */\n static unplay() {\n const ret = wasm.square_unplay();\n return Square.__wrap(ret);\n }\n}\n\nexport function __wbindgen_object_drop_ref(arg0) {\n takeObject(arg0);\n};\n\nexport function __wbindgen_string_new(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_693216e109162396() {\n const ret = new Error();\n return addHeapObject(ret);\n};\n\nexport function __wbg_stack_0ddaca5d1abfb52f(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nexport function __wbg_error_09919627ac0992f5(arg0, arg1) {\n try {\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(arg0, arg1);\n }\n};\n\nexport function __wbg_randomFillSync_d2ba53160aec6aba(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n};\n\nexport function __wbg_getRandomValues_e57c9b75ddead065(arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n};\n\nexport function __wbg_self_86b4b13392c7af56() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_crypto_b8c92eaac23d0d80(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nexport function __wbg_msCrypto_9ad6677321a08dd8(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_is_undefined(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n};\n\nexport function __wbg_require_f5521a5b85ad2542(arg0, arg1, arg2) {\n const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_dd27e6b0652b3236(arg0) {\n const ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n};\n\nexport function __wbg_static_accessor_MODULE_452b4680e8614c81() {\n const ret = module;\n return addHeapObject(ret);\n};\n\nexport function __wbg_instanceof_Window_0e6c0f1096d66c3c(arg0) {\n const ret = getObject(arg0) instanceof Window;\n return ret;\n};\n\nexport function __wbg_document_99eddbbc11ec831e(arg0) {\n const ret = getObject(arg0).document;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_getElementById_f83c5de20dc455d6(arg0, arg1, arg2) {\n const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_error_8ff19d586a987aef(arg0) {\n console.error(getObject(arg0));\n};\n\nexport function __wbg_log_e8ba7b992c7ad0eb(arg0) {\n console.log(getObject(arg0));\n};\n\nexport function __wbg_instanceof_CanvasRenderingContext2d_405495bb0ea92c4f(arg0) {\n const ret = getObject(arg0) instanceof CanvasRenderingContext2D;\n return ret;\n};\n\nexport function __wbg_setstrokeStyle_32540003cbfe210b(arg0, arg1) {\n getObject(arg0).strokeStyle = getObject(arg1);\n};\n\nexport function __wbg_setfillStyle_1d391c4891a6ec4d(arg0, arg1) {\n getObject(arg0).fillStyle = getObject(arg1);\n};\n\nexport function __wbg_setlineWidth_6f1b76036ab98bfc(arg0, arg1) {\n getObject(arg0).lineWidth = arg1;\n};\n\nexport function __wbg_beginPath_e040b5521d41f537(arg0) {\n getObject(arg0).beginPath();\n};\n\nexport function __wbg_fill_b6e37fbbefb55ae0(arg0) {\n getObject(arg0).fill();\n};\n\nexport function __wbg_stroke_63664360a52ce7d1(arg0) {\n getObject(arg0).stroke();\n};\n\nexport function __wbg_arc_85205a36bd04df0a() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).arc(arg1, arg2, arg3, arg4, arg5);\n}, arguments) };\n\nexport function __wbg_fillRect_59b38b7e6f8d0717(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).fillRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_strokeRect_469c3838c9d01537(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef(arg0) {\n const ret = getObject(arg0) instanceof HTMLCanvasElement;\n return ret;\n};\n\nexport function __wbg_setwidth_654d8adcd4979eed(arg0, arg1) {\n getObject(arg0).width = arg1 >>> 0;\n};\n\nexport function __wbg_setheight_2b662384bfacb65c(arg0, arg1) {\n getObject(arg0).height = arg1 >>> 0;\n};\n\nexport function __wbg_getContext_0c19ba5c037e057f() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_newnoargs_e23b458e372830de(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nexport function __wbg_call_ae78342adc33730a() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_self_99737b4dcdf6f0d8() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_window_9b61fbbf3564c4fb() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_globalThis_8e275ef40caea3a3() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_global_5de1e0f82bddcd27() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_buffer_7af23f65f6c64548(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_cc9018bd6f283b6f(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nexport function __wbg_set_f25e869e4565d2a2(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nexport function __wbg_length_0acb1cf9bbaf8519(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n};\n\nexport function __wbg_newwithlength_8f0657faca9f1422(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbg_subarray_da527dbd24eafb6b(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_object_clone_ref(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_debug_string(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nexport function __wbindgen_throw(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nexport function __wbindgen_memory() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n};\n\n","import { Game, Board, BrdIdx, Painter, Team, init_wasm, Moveable, SquareState, Square } from \"draught\";\n// import { memory } from \"draught/draught_bg.wasm\";\n\n///////////////////\n// CONSTS\n///////////////////\n\nconst CANVAS_WIDTH = 720;\nconst CANVAS_HEIGHT = 720;\n\nvar BOARD_WIDTH = 8;\nvar BOARD_HEIGHT = 8;\n\nvar PIECE_ROWS = 3;\nvar SEARCH_DEPTH = 4;\nvar PERFECT_CHANCE = 0.5;\n\nconst STATUS_TIMEOUT = 3000;\nconst WON_TIMEOUT = 3000;\n\nconst GameState = {\n HUMAN_TURN: {\n THINKING: \"human_turn.thinking\",\n FROM_SELECTED: \"human_turn.from_selected\"\n },\n AI_TURN: \"ai_turn\"\n}\n\n//////////////////\n// GAME STUFF\n//////////////////\n\ninit_wasm();\n\n// let board = new Board(BOARD_WIDTH, BOARD_HEIGHT, Team.Black);\n\nconst statusText = document.getElementById(\"status-p\");\nconst statusAlert = document.getElementById(\"status-d\");\nconst teamText = document.getElementById(\"team-p\");\nconst nodeCountText = document.getElementById(\"node-count\");\nconst winningText = document.getElementById(\"winning-p\");\n\nconst startBtn = document.getElementById(\"startBtn\");\nstartBtn.onclick = start_game;\n\nlet wonTimeout = null;\nlet statusTimeout = null;\nlet setStatus = setStatusAlert;\n\nlet current_state = GameState.HUMAN_TURN.THINKING;\n\nlet game = null;\nlet painter = null;\n\nlet clicks = [];\n\nstart_game();\n\n/////////////////\n// CANVAS\n/////////////////\n\nconst canvas = document.getElementById(\"game-canvas\");\ncanvas.addEventListener(\"click\", (event) => {\n var mousepos = getMousePos(canvas, event);\n // console.log(mousepos);\n var cell = new BrdIdx(\n Math.floor((mousepos.y / canvas.clientHeight) * BOARD_HEIGHT),\n Math.floor((mousepos.x / canvas.clientWidth) * BOARD_WIDTH),\n );\n // console.log(cell);\n process_canvas_click(cell);\n});\n\n////////////////\n// FUNCS\n////////////////\n\nfunction start_game() {\n game = new Game(BOARD_WIDTH, BOARD_HEIGHT, PIECE_ROWS, Team.Black, SEARCH_DEPTH);\n painter = new Painter(CANVAS_WIDTH, CANVAS_HEIGHT, \"game-canvas\");\n game.set_painter(painter);\n game.draw();\n\n clearInterval(wonTimeout);\n updateTeamText();\n updateWinningText();\n clicks = [];\n current_state = GameState.HUMAN_TURN.THINKING;\n}\n\nfunction process_canvas_click(cell_coord) {\n\n switch(current_state) {\n // first click of a move\n case GameState.HUMAN_TURN.THINKING:\n if (game.current_cell_state(cell_coord).state != SquareState.Occupied ) {\n return;\n }\n\n if (game.current_cell_state(cell_coord).occupant.team != game.current_turn() ) {\n return;\n }\n\n // console.log(\"Your turn, first piece picked\");\n\n clicks.push(cell_coord);\n current_state = GameState.HUMAN_TURN.FROM_SELECTED;\n game.set_selected(cell_coord);\n game.draw();\n \n break;\n \n // second click of a move\n case GameState.HUMAN_TURN.FROM_SELECTED:\n\n // second click is different to first, process as move\n // otherwise, will skip straight to clean up (clear selected and clicks) \n if (!clicks[0].eq(cell_coord)) {\n\n if (game.current_cell_state(cell_coord).state != SquareState.Empty ) {\n return;\n }\n \n // console.log(\"Your turn, first piece already picked, picking second\");\n \n clicks.push(cell_coord);\n \n if (clicks.length != 2) {\n setStatus(`Error: wrong number of clicks to process ${clicks.length}`);\n console.error(`Error: wrong number of clicks to process ${clicks.length}`);\n \n return;\n }\n\n let status = game.make_move(clicks[0], clicks[1]);\n\n switch(status) {\n case Moveable.Allowed:\n\n if (aiCheckBox.checked && game.has_won() === undefined) {\n\n let start = performance.now();\n\n game.ai_move();\n\n let end = performance.now();\n\n nodeCountText.innerText = `searched ${game.last_node_count.toLocaleString(\"en-GB\")} possible moves in ${(end - start).toLocaleString()}ms`;\n }\n\n break;\n case Moveable.IllegalTrajectory:\n setStatus(\"You can't move like that!\");\n break;\n case Moveable.JumpingSameTeam:\n setStatus(\"You can't jump your own piece!\");\n break;\n case Moveable.NoJumpablePiece:\n setStatus(\"There's nothing to jump!\");\n break;\n case Moveable.OccupiedDest:\n setStatus(\"There's a piece there!\");\n break;\n case Moveable.OutOfBounds:\n setStatus(\"That square's not on the board! (how have you managed that?)\");\n break;\n case Moveable.UnoccupiedSrc:\n setStatus(\"There's no piece to move!\");\n break;\n case Moveable.Unplayable:\n setStatus(\"That's not a playable square!\");\n break;\n case Moveable.WrongTeamSrc:\n setStatus(\"That's not your piece!\");\n break;\n }\n \n }\n\n game.clear_selected();\n game.draw();\n clicks = [];\n current_state = GameState.HUMAN_TURN.THINKING;\n \n break;\n case GameState.AI_TURN:\n console.log(\"It's the AI's turn!\");\n break;\n }\n\n updateTeamText();\n updateWinningText();\n checkWon();\n}\n\nfunction getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}\n\nfunction setStatusText(txt, hide = true) {\n if(statusTimeout != null) {\n clearInterval(statusTimeout);\n }\n\n statusText.innerText = txt;\n\n if(hide) {\n statusTimeout = setTimeout(() => {\n statusText.innerText = \"\";\n }, STATUS_TIMEOUT);\n }\n}\n\nfunction setStatusAlert(txt, alertType = \"danger\", hide = true) {\n if(statusTimeout != null) {\n clearInterval(statusTimeout);\n }\n\n statusAlert.className = `alert alert-${alertType}`;\n statusAlert.innerText = txt;\n statusAlert.hidden = false;\n\n if(hide) {\n statusTimeout = setTimeout(() => {\n statusAlert.hidden = true;\n }, STATUS_TIMEOUT);\n }\n}\n\nfunction updateTeamText(){\n let team = game.current_turn();\n switch(team) {\n case Team.White:\n teamText.innerText = \"⚪ White ⚪\";\n break;\n case Team.Black:\n teamText.innerText = \"🔴 Black 🔴\";\n break;\n }\n}\n\nfunction updateWinningText(){\n \n switch(game.winning()) {\n case undefined:\n winningText.innerText = \"\";\n break;\n case Team.White:\n winningText.innerText = \"👑 White 👑\";\n break;\n case Team.Black:\n winningText.innerText = \"👑 Black 👑\";\n break;\n }\n}\n\nfunction checkWon() {\n\n switch(game.has_won()) {\n case undefined:\n break;\n case Team.White:\n setStatus(\"You Lost!\");\n wonTimeout = setInterval(() => {\n start_game();\n }, WON_TIMEOUT);\n break;\n case Team.Black:\n setStatus(\"You Won!\", \"success\");\n wonTimeout = setInterval(() => {\n start_game();\n }, WON_TIMEOUT);\n break;\n }\n}\n\n////////////////\n// UI\n////////////////\n\nconst widthBox = document.getElementById(\"width\");\n/**\n * Handler for width input box change, start a new game\n */\nconst onWidth = () => {\n\n BOARD_WIDTH = parseInt(widthBox.value);\n start_game();\n}\nwidthBox.onchange = onWidth;\nwidthBox.value = 8;\n\nconst heightBox = document.getElementById(\"height\");\n/**\n * Handler for height input box change, start a new game\n */\nconst onHeight = () => {\n\n BOARD_HEIGHT = parseInt(heightBox.value);\n pieceRowsBox.max = (BOARD_HEIGHT / 2) - 1;\n start_game();\n}\nheightBox.onchange = onHeight;\nheightBox.value = 8;\n\nconst pieceRowsBox = document.getElementById(\"play_rows\");\n/**\n * Handler for piece rows input box change, start a new game\n */\nconst onPieceRows = () => {\n\n PIECE_ROWS = parseInt(pieceRowsBox.value);\n start_game();\n}\npieceRowsBox.onchange = onPieceRows;\npieceRowsBox.value = 3;\n\nconst aiSearchDepthBox = document.getElementById(\"ai_search_depth\");\n/**\n * Handler for AI search depth input box change, start a new game\n */\nconst onAISearchDepth = () => {\n\n SEARCH_DEPTH = parseInt(aiSearchDepthBox.value);\n game.set_search_depth(SEARCH_DEPTH);\n\n if(SEARCH_DEPTH > 4) {\n setStatus(\"This increases thinking time exponentially, be careful (probably don't go past 6)\", \"warning\");\n }\n}\naiSearchDepthBox.onchange = onAISearchDepth;\naiSearchDepthBox.value = 4;\n\nconst aiCheckBox = document.getElementById(\"ai-checkbox\");\n/**\n * Handler for height input box change, get a new universe of given size\n */\nconst onAICheck = () => {\n \n}\naiCheckBox.onchange = onAICheck;\n// aiCheckBox.checked = true;\n\nconst aiPerfectChance = document.getElementById(\"ai_difficulty\");\n/**\n * Handler for piece rows input box change, start a new game\n */\nconst onPerfectChance = () => {\n\n PERFECT_CHANCE = parseInt(aiPerfectChance.value) / 100;\n game.set_perfect_chance(PERFECT_CHANCE);\n}\naiPerfectChance.onchange = onPerfectChance;\naiPerfectChance.value = 50;"],"names":["heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","module","require","ignoreBOM","fatal","decode","cachegetUint8Memory0","getUint8Memory0","buffer","Uint8Array","getStringFromWasm0","ptr","len","subarray","addHeapObject","obj","debugString","val","type","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","Error","message","stack","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encodeString","encodeInto","arg","view","buf","encode","set","read","written","passStringToWasm0","malloc","realloc","mem","offset","code","charCodeAt","slice","cachegetInt32Memory0","getInt32Memory0","Int32Array","isLikeNone","x","_assertClass","instance","klass","init_wasm","handleError","f","args","apply","this","e","Object","freeze","Move","Jump","Team","Black","White","SquareState","Man","King","Empty","Occupied","Unplayable","Moveable","Allowed","UnoccupiedSrc","OccupiedDest","OutOfBounds","WrongTeamSrc","IllegalTrajectory","NoJumpablePiece","JumpingSameTeam","Board","static","create","prototype","__destroy_into_raw","free","width","arg0","height","current_turn","cell","Square","__wrap","set_cell","square","ptr0","grid_cell","BrdIdx","cell_index","row","col","cell_idx","board_index","can_move","from","to","ptr1","validate_man_move","from_square_occupant","Piece","ptr2","validate_king_move","jumpee_idx","cells","num_cells","num_pieces","num_player","team","score","cell_state","apply_move","apply_jump","king_row_idx","jumpee","from_occ","constructor","board","piece_rows","eq","other","Game","last_node_count","perfect_chance","current_board_cells","current_board_len","winning","has_won","current_cell_state","set_search_depth","search_depth","set_selected","set_perfect_chance","new_chance","clear_selected","make_move","execute_move","execute_jump","push_new_board","set_current","first_turn","canvas_id","canvas_width","canvas_height","len0","set_painter","value","Painter","draw","ai_move","canvas","set_square_outline","set_outline_width","set_draw_outline","reset_dimensions","validate_board_dim","strength","occupant","state","__wbindgen_object_drop_ref","__wbindgen_string_new","arg1","__wbg_new_693216e109162396","__wbg_stack_0ddaca5d1abfb52f","__wbg_error_09919627ac0992f5","console","error","__wbg_randomFillSync_d2ba53160aec6aba","arg2","randomFillSync","__wbg_getRandomValues_e57c9b75ddead065","getRandomValues","__wbg_self_86b4b13392c7af56","self","arguments","__wbg_crypto_b8c92eaac23d0d80","crypto","__wbg_msCrypto_9ad6677321a08dd8","msCrypto","__wbindgen_is_undefined","__wbg_require_f5521a5b85ad2542","__wbg_getRandomValues_dd27e6b0652b3236","__wbg_static_accessor_MODULE_452b4680e8614c81","__wbg_instanceof_Window_0e6c0f1096d66c3c","Window","__wbg_document_99eddbbc11ec831e","document","__wbg_getElementById_f83c5de20dc455d6","getElementById","__wbg_error_8ff19d586a987aef","__wbg_log_e8ba7b992c7ad0eb","log","__wbg_instanceof_CanvasRenderingContext2d_405495bb0ea92c4f","CanvasRenderingContext2D","__wbg_setstrokeStyle_32540003cbfe210b","strokeStyle","__wbg_setfillStyle_1d391c4891a6ec4d","fillStyle","__wbg_setlineWidth_6f1b76036ab98bfc","lineWidth","__wbg_beginPath_e040b5521d41f537","beginPath","__wbg_fill_b6e37fbbefb55ae0","__wbg_stroke_63664360a52ce7d1","stroke","__wbg_arc_85205a36bd04df0a","arg3","arg4","arg5","arc","__wbg_fillRect_59b38b7e6f8d0717","fillRect","__wbg_strokeRect_469c3838c9d01537","strokeRect","__wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef","HTMLCanvasElement","__wbg_setwidth_654d8adcd4979eed","__wbg_setheight_2b662384bfacb65c","__wbg_getContext_0c19ba5c037e057f","getContext","__wbg_newnoargs_e23b458e372830de","Function","__wbg_call_ae78342adc33730a","__wbg_self_99737b4dcdf6f0d8","__wbg_window_9b61fbbf3564c4fb","window","__wbg_globalThis_8e275ef40caea3a3","globalThis","__wbg_global_5de1e0f82bddcd27","g","global","__wbg_buffer_7af23f65f6c64548","__wbg_new_cc9018bd6f283b6f","__wbg_set_f25e869e4565d2a2","__wbg_length_0acb1cf9bbaf8519","__wbg_newwithlength_8f0657faca9f1422","__wbg_subarray_da527dbd24eafb6b","__wbindgen_object_clone_ref","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_memory","CANVAS_WIDTH","CANVAS_HEIGHT","BOARD_WIDTH","BOARD_HEIGHT","PIECE_ROWS","SEARCH_DEPTH","PERFECT_CHANCE","STATUS_TIMEOUT","WON_TIMEOUT","GameState","HUMAN_TURN","THINKING","FROM_SELECTED","AI_TURN","statusAlert","teamText","nodeCountText","winningText","onclick","start_game","wonTimeout","statusTimeout","setStatus","setStatusAlert","current_state","game","painter","clicks","clearInterval","updateTeamText","updateWinningText","process_canvas_click","cell_coord","aiCheckBox","checked","start","performance","now","end","innerText","toLocaleString","checkWon","getMousePos","evt","rect","getBoundingClientRect","clientX","left","y","clientY","top","txt","alertType","hide","hidden","setTimeout","setInterval","addEventListener","event","mousepos","Math","floor","clientHeight","clientWidth","widthBox","onWidth","parseInt","onchange","heightBox","onHeight","pieceRowsBox","max","onPieceRows","aiSearchDepthBox","onAISearchDepth","onAICheck","aiPerfectChance","onPerfectChance"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"10.bootstrap.js","mappings":"wtBAEA,MAAMA,EAAO,IAAIC,MAAM,IAAIC,UAAKC,GAIhC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,EAAM,CAF5CL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EAAKQ,OAErB,SAASC,EAAWJ,GACZA,EAAM,KACVL,EAAKK,GAAOE,EACZA,EAAYF,EAChB,CAEA,SAASK,EAAWL,GAChB,MAAMM,EAAMP,EAAUC,GAEtB,OADAI,EAAWJ,GACJM,CACX,CAIA,IAAIC,EAAoB,IAFoB,oBAAhBC,aAA8B,EAAIC,EAAOC,SAAS,QAAQF,YAAcA,aAE3D,QAAS,CAAEG,WAAW,EAAMC,OAAO,IAE5EL,EAAkBM,SAElB,IAAIC,EAAqB,IAAIC,WAE7B,SAASC,IAIL,OAHsC,IAAlCF,EAAmBG,aACnBH,EAAqB,IAAIC,WAAW,kBAEjCD,CACX,CAEA,SAASI,EAAmBC,EAAKC,GAC7B,OAAOb,EAAkBM,OAAOG,IAAkBK,S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EAASX,EAAI7I,EAAO2J,aAAgB3D,GAChDyD,KAAKC,MAAOF,EAASxQ,EAAIgH,EAAO4J,YAAe7D,IAGzB,IAsN9B,MAAM8D,EAAWxH,SAASE,eAAe,SAInCuH,EAAU,KAEZ/D,EAAcgE,SAASF,EAASjK,OAChCoH,GAAY,EAEhB6C,EAASG,SAAWF,EACpBD,EAASjK,MAAQ,EAEjB,MAAMqK,EAAY5H,SAASE,eAAe,UAIpC2H,EAAW,KAEblE,EAAe+D,SAASE,EAAUrK,OAClCuK,EAAaC,IAAQpE,EAAe,EAAK,EACzCgB,GAAY,EAEhBiD,EAAUD,SAAWE,EACrBD,EAAUrK,MAAQ,EAElB,MAAMuK,EAAe9H,SAASE,eAAe,aAIvC8H,EAAc,KAEhBpE,EAAa8D,SAASI,EAAavK,OACnCoH,GAAY,EAEhBmD,EAAaH,SAAWK,EACxBF,EAAavK,MAAQ,EAErB,MAAM0K,EAAmBjI,SAASE,eAAe,mBAI3CgI,EAAkB,KAEpBrE,EAAe6D,SAASO,EAAiB1K,OACzC0H,EAAK3I,iBAAiBuH,GAEnBA,EAAe,GACdiB,EAAU,oFAAqF,UACnG,EAEJmD,EAAiBN,SAAWO,EAC5BD,EAAiB1K,MAAQ,EAEzB,MAAMkI,EAAazF,SAASE,eAAe,eAIrCiI,EAAY,OAGlB1C,EAAWkC,SAAWQ,EAGtB,MAAMC,EAAkBpI,SAASE,eAAe,iBAI1CmI,EAAkB,KAEpBvE,EAAiB4D,SAASU,EAAgB7K,OAAS,IACnD0H,EAAKxI,mBAAmBqH,EAAe,EAE3CsE,EAAgBT,SAAWU,EAC3BD,EAAgB7K,MAAQ,G","sources":["webpack://draught/../pkg/draught_bg.js","webpack://draught/./index.js"],"sourcesContent":["import * as wasm from './draught_bg.wasm';\n\nconst heap = new Array(32).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nfunction getObject(idx) { return heap[idx]; }\n\nlet heap_next = heap.length;\n\nfunction dropObject(idx) {\n if (idx < 36) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;\n\nlet cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachedUint8Memory0 = new Uint8Array();\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;\n\nlet cachedTextEncoder = new lTextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length);\n getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len);\n\n const mem = getUint8Memory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3);\n const view = getUint8Memory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachedInt32Memory0 = new Int32Array();\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n return instance.ptr;\n}\n/**\n*/\nexport function init_wasm() {\n wasm.init_wasm();\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* Move/Jump, for use in Move\n*/\nexport const MoveType = Object.freeze({ Move:0,\"0\":\"Move\",Jump:1,\"1\":\"Jump\", });\n/**\n* Black/White\n*/\nexport const Team = Object.freeze({ Black:0,\"0\":\"Black\",White:1,\"1\":\"White\", });\n/**\n* Man/King\n*/\nexport const Strength = Object.freeze({ Man:0,\"0\":\"Man\",King:1,\"1\":\"King\", });\n/**\n* Model board square as Empty/Occupied/Unplayable\n*/\nexport const SquareState = Object.freeze({ Empty:0,\"0\":\"Empty\",Occupied:1,\"1\":\"Occupied\",Unplayable:2,\"2\":\"Unplayable\", });\n/**\n* Possible outcomes of trying to move\n*/\nexport const Moveable = 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\", });\n/**\n* Single state of a checkers board\n*/\nexport class Board {\n\n static __wrap(ptr) {\n const obj = Object.create(Board.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_board_free(ptr);\n }\n /**\n * @returns {number}\n */\n get width() {\n const ret = wasm.__wbg_get_board_width(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set width(arg0) {\n wasm.__wbg_set_board_width(this.ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get height() {\n const ret = wasm.__wbg_get_board_height(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set height(arg0) {\n wasm.__wbg_set_board_height(this.ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get current_turn() {\n const ret = wasm.__wbg_get_board_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set current_turn(arg0) {\n wasm.__wbg_set_board_current_turn(this.ptr, arg0);\n }\n /**\n * Get a copy of a board square by 1D array index\n * @param {number} idx\n * @returns {Square}\n */\n cell(idx) {\n const ret = wasm.board_cell(this.ptr, idx);\n return Square.__wrap(ret);\n }\n /**\n * Get a copy of a board square by 1D array index\n * @param {number} idx\n * @param {Square} square\n */\n set_cell(idx, square) {\n _assertClass(square, Square);\n var ptr0 = square.ptr;\n square.ptr = 0;\n wasm.board_set_cell(this.ptr, idx, ptr0);\n }\n /**\n * Get a copy of a board square by 2D [`BrdIdx`] index\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n grid_cell(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n const ret = wasm.board_grid_cell(this.ptr, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * Transform a 2D row/column board index into a single 1D index for use with [`Board::cells`]\n * @param {number} row\n * @param {number} col\n * @returns {number}\n */\n cell_index(row, col) {\n const ret = wasm.board_cell_index(this.ptr, row, col);\n return ret >>> 0;\n }\n /**\n * Similar to [`Board::cell_index`] but with a [`BrdIdx`] instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with [`Board::cells`]\n * @param {BrdIdx} idx\n * @returns {number}\n */\n cell_idx(idx) {\n _assertClass(idx, BrdIdx);\n var ptr0 = idx.ptr;\n idx.ptr = 0;\n const ret = wasm.board_cell_idx(this.ptr, ptr0);\n return ret >>> 0;\n }\n /**\n * Transform a 1D array index (for [`Board::cells`]) into a 2D game board index (by row/col)\n * @param {number} idx\n * @returns {BrdIdx}\n */\n board_index(idx) {\n const ret = wasm.board_board_index(this.ptr, idx);\n return BrdIdx.__wrap(ret);\n }\n /**\n * Check whether a move given by source and destination indices is legal\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n can_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_can_move(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Check that given move trajectory is valid for a man piece\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @param {Piece} from_square_occupant\n * @returns {number}\n */\n validate_man_move(from, to, from_square_occupant) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n _assertClass(from_square_occupant, Piece);\n var ptr2 = from_square_occupant.ptr;\n from_square_occupant.ptr = 0;\n const ret = wasm.board_validate_man_move(this.ptr, ptr0, ptr1, ptr2);\n return ret >>> 0;\n }\n /**\n * Check that given move trajectory is valid for a king piece\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @param {Piece} from_square_occupant\n * @returns {number}\n */\n validate_king_move(from, to, from_square_occupant) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n _assertClass(from_square_occupant, Piece);\n var ptr2 = from_square_occupant.ptr;\n from_square_occupant.ptr = 0;\n const ret = wasm.board_validate_king_move(this.ptr, ptr0, ptr1, ptr2);\n return ret >>> 0;\n }\n /**\n * Get cell index of jumpee square given from and to locations\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n jumpee_idx(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_jumpee_idx(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Get a pointer to the backing array of board squares, [`Board::cells`]\n * @returns {number}\n */\n cells() {\n const ret = wasm.board_cells(this.ptr);\n return ret;\n }\n /**\n * Get the number of board squares\n * @returns {number}\n */\n num_cells() {\n const ret = wasm.board_num_cells(this.ptr);\n return ret >>> 0;\n }\n /**\n * Get the number of remaining pieces\n * @returns {number}\n */\n num_pieces() {\n const ret = wasm.board_num_pieces(this.ptr);\n return ret >>> 0;\n }\n /**\n * Get the number of remaining pieces for a player\n * @param {number} team\n * @returns {number}\n */\n num_player(team) {\n const ret = wasm.board_num_player(this.ptr, team);\n return ret >>> 0;\n }\n /**\n * Get the score value, Black - White pieces\n * @returns {number}\n */\n score() {\n const ret = wasm.board_score(this.ptr);\n return ret;\n }\n /**\n * Get the state of a board square by 1D array index\n * @param {number} idx\n * @returns {number}\n */\n cell_state(idx) {\n const ret = wasm.board_cell_state(this.ptr, idx);\n return ret >>> 0;\n }\n /**\n * Get new board derived from current with given move applied\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {Board}\n */\n apply_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_apply_move(this.ptr, ptr0, ptr1);\n return Board.__wrap(ret);\n }\n /**\n * Get new board derived from current with given jump applied\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {Board}\n */\n apply_jump(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.board_apply_jump(this.ptr, ptr0, ptr1);\n return Board.__wrap(ret);\n }\n /**\n * Get row index for current team, top row for black, bottom row for white\n * @returns {number}\n */\n king_row_idx() {\n const ret = wasm.board_king_row_idx(this.ptr);\n return ret >>> 0;\n }\n /**\n * Unwrap the jumpee piece from the square and [`Board::check_jumpee_team`] with [`Moveable`] response\n * @param {Square} jumpee\n * @param {Piece} from_occ\n * @returns {number}\n */\n static validate_jumpee(jumpee, from_occ) {\n _assertClass(jumpee, Square);\n var ptr0 = jumpee.ptr;\n jumpee.ptr = 0;\n _assertClass(from_occ, Piece);\n var ptr1 = from_occ.ptr;\n from_occ.ptr = 0;\n const ret = wasm.board_validate_jumpee(ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Check that the source piece and the jumpee are of opposing teams\n * @param {Piece} from\n * @param {Piece} jumpee\n * @returns {boolean}\n */\n static check_jumpee_team(from, jumpee) {\n _assertClass(from, Piece);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(jumpee, Piece);\n var ptr1 = jumpee.ptr;\n jumpee.ptr = 0;\n const ret = wasm.board_check_jumpee_team(ptr0, ptr1);\n return ret !== 0;\n }\n /**\n * Initialise a game board without game pieces\n * @param {number} width\n * @param {number} height\n * @param {number} current_turn\n */\n constructor(width, height, current_turn) {\n const ret = wasm.board_new(width, height, current_turn);\n return Board.__wrap(ret);\n }\n /**\n * Reset the given board to a starting layout with 3 rows of opposing pieces\n * @param {Board} board\n * @param {number} piece_rows\n * @returns {Board}\n */\n static init_game(board, piece_rows) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n const ret = wasm.board_init_game(ptr0, piece_rows);\n return Board.__wrap(ret);\n }\n}\n/**\n* Rank 2 tensor index to identify a board square by row and column\n*/\nexport class BrdIdx {\n\n static __wrap(ptr) {\n const obj = Object.create(BrdIdx.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_brdidx_free(ptr);\n }\n /**\n * @returns {number}\n */\n get row() {\n const ret = wasm.__wbg_get_brdidx_row(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set row(arg0) {\n wasm.__wbg_set_brdidx_row(this.ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get col() {\n const ret = wasm.__wbg_get_brdidx_col(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set col(arg0) {\n wasm.__wbg_set_brdidx_col(this.ptr, arg0);\n }\n /**\n * @param {number} row\n * @param {number} col\n */\n constructor(row, col) {\n const ret = wasm.brdidx_from(row, col);\n return BrdIdx.__wrap(ret);\n }\n /**\n * @param {BrdIdx} other\n * @returns {boolean}\n */\n eq(other) {\n _assertClass(other, BrdIdx);\n const ret = wasm.brdidx_eq(this.ptr, other.ptr);\n return ret !== 0;\n }\n}\n/**\n* Root-level structure for managing the game as a collection of board states\n*/\nexport class Game {\n\n static __wrap(ptr) {\n const obj = Object.create(Game.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_game_free(ptr);\n }\n /**\n * @returns {number}\n */\n get last_node_count() {\n const ret = wasm.__wbg_get_game_last_node_count(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set last_node_count(arg0) {\n wasm.__wbg_set_game_last_node_count(this.ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get perfect_chance() {\n const ret = wasm.__wbg_get_game_perfect_chance(this.ptr);\n return ret;\n }\n /**\n * @param {number} arg0\n */\n set perfect_chance(arg0) {\n wasm.__wbg_set_game_perfect_chance(this.ptr, arg0);\n }\n /**\n * Get pointer to current board's squares\n * @returns {number}\n */\n current_board_cells() {\n const ret = wasm.game_current_board_cells(this.ptr);\n return ret;\n }\n /**\n * Get pointer to current board's squares\n * @returns {number}\n */\n current_board_len() {\n const ret = wasm.game_current_board_len(this.ptr);\n return ret >>> 0;\n }\n /**\n * Current turn's team\n * @returns {number}\n */\n current_turn() {\n const ret = wasm.game_current_turn(this.ptr);\n return ret >>> 0;\n }\n /**\n * Current board's score\n * @returns {number}\n */\n score() {\n const ret = wasm.game_score(this.ptr);\n return ret;\n }\n /**\n * Get currently winning player\n * @returns {number | undefined}\n */\n winning() {\n const ret = wasm.game_winning(this.ptr);\n return ret === 2 ? undefined : ret;\n }\n /**\n * Check if a player has won\n * @returns {number | undefined}\n */\n has_won() {\n const ret = wasm.game_has_won(this.ptr);\n return ret === 2 ? undefined : ret;\n }\n /**\n * Get square on current board for given index\n * @param {BrdIdx} idx\n * @returns {Square}\n */\n current_cell_state(idx) {\n _assertClass(idx, BrdIdx);\n const ret = wasm.game_current_cell_state(this.ptr, idx.ptr);\n return Square.__wrap(ret);\n }\n /**\n * Set tree depth for AI to search to\n * @param {number} search_depth\n */\n set_search_depth(search_depth) {\n wasm.game_set_search_depth(this.ptr, search_depth);\n }\n /**\n * Set given index as selected piece\n * TODO: Check whether valid square?\n * @param {BrdIdx} idx\n */\n set_selected(idx) {\n _assertClass(idx, BrdIdx);\n wasm.game_set_selected(this.ptr, idx.ptr);\n }\n /**\n * Set proportion of perfect moves from AI\n * @param {number} new_chance\n */\n set_perfect_chance(new_chance) {\n wasm.game_set_perfect_chance(this.ptr, new_chance);\n }\n /**\n * Clear currently selected piece\n */\n clear_selected() {\n wasm.game_clear_selected(this.ptr);\n }\n /**\n * Attempt to make a move given a source and destination index\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n * @returns {number}\n */\n make_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n const ret = wasm.game_make_move(this.ptr, ptr0, ptr1);\n return ret >>> 0;\n }\n /**\n * Update board state with given move and push new board into current state\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n */\n execute_move(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n wasm.game_execute_move(this.ptr, ptr0, ptr1);\n }\n /**\n * Update board state with given jump move and push new board into current state\n * @param {BrdIdx} from\n * @param {BrdIdx} to\n */\n execute_jump(from, to) {\n _assertClass(from, BrdIdx);\n var ptr0 = from.ptr;\n from.ptr = 0;\n _assertClass(to, BrdIdx);\n var ptr1 = to.ptr;\n to.ptr = 0;\n wasm.game_execute_jump(this.ptr, ptr0, ptr1);\n }\n /**\n * Push current board into the previous turns and set given board to current\n * @param {Board} board\n */\n push_new_board(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n wasm.game_push_new_board(this.ptr, ptr0);\n }\n /**\n * Set current board to given\n * @param {Board} board\n */\n set_current(board) {\n _assertClass(board, Board);\n var ptr0 = board.ptr;\n board.ptr = 0;\n wasm.game_set_current(this.ptr, ptr0);\n }\n /**\n * Get new game without board renderer\n * @param {number} width\n * @param {number} height\n * @param {number} piece_rows\n * @param {number} first_turn\n * @param {number} search_depth\n */\n constructor(width, height, piece_rows, first_turn, search_depth) {\n const ret = wasm.game_new(width, height, piece_rows, first_turn, search_depth);\n return Game.__wrap(ret);\n }\n /**\n * Get a new game with canvas ID and dimensions\n * @param {number} width\n * @param {number} height\n * @param {number} piece_rows\n * @param {number} first_turn\n * @param {number} search_depth\n * @param {string} canvas_id\n * @param {number} canvas_width\n * @param {number} canvas_height\n * @returns {Game}\n */\n static new_with_canvas(width, height, piece_rows, first_turn, search_depth, canvas_id, canvas_width, canvas_height) {\n const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.game_new_with_canvas(width, height, piece_rows, first_turn, search_depth, ptr0, len0, canvas_width, canvas_height);\n return Game.__wrap(ret);\n }\n /**\n * Set painter for rendering boards\n * @param {Painter} value\n */\n set_painter(value) {\n _assertClass(value, Painter);\n var ptr0 = value.ptr;\n value.ptr = 0;\n wasm.game_set_painter(this.ptr, ptr0);\n }\n /**\n * Draw current board using painter if exists\n */\n draw() {\n wasm.game_draw(this.ptr);\n }\n /**\n * Create computer, get move from current board and update current board\n */\n ai_move() {\n wasm.game_ai_move(this.ptr);\n }\n}\n/**\n* Used to paint boards onto HTML canvases\n*/\nexport class Painter {\n\n static __wrap(ptr) {\n const obj = Object.create(Painter.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_painter_free(ptr);\n }\n /**\n * Default constructor which queries for canvas by ID\n * @param {number} width\n * @param {number} height\n * @param {string} canvas_id\n */\n constructor(width, height, canvas_id) {\n const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.painter_new(width, height, ptr0, len0);\n return Painter.__wrap(ret);\n }\n /**\n * Constructor with given canvas element\n * @param {number} width\n * @param {number} height\n * @param {HTMLCanvasElement} canvas\n * @returns {Painter}\n */\n static new_with_canvas(width, height, canvas) {\n const ret = wasm.painter_new_with_canvas(width, height, addHeapObject(canvas));\n return Painter.__wrap(ret);\n }\n /**\n * Set new square outline colour value\n * @param {any} value\n */\n set_square_outline(value) {\n wasm.painter_set_square_outline(this.ptr, addHeapObject(value));\n }\n /**\n * Set new line width for outlining squares\n * @param {number} value\n */\n set_outline_width(value) {\n wasm.painter_set_outline_width(this.ptr, value);\n }\n /**\n * Set whether squares are outlined\n * @param {boolean} value\n */\n set_draw_outline(value) {\n wasm.painter_set_draw_outline(this.ptr, value);\n }\n /**\n * Reset the canvas dimensions to the given width and height\n */\n reset_dimensions() {\n wasm.painter_reset_dimensions(this.ptr);\n }\n /**\n * Check whether given canvas dimensions divide evenly by given board dimenions\n * @param {Board} board\n * @returns {boolean}\n */\n validate_board_dim(board) {\n _assertClass(board, Board);\n const ret = wasm.painter_validate_board_dim(this.ptr, board.ptr);\n return ret !== 0;\n }\n /**\n * Draw a board onto the canvas\n * @param {Board} board\n */\n draw(board) {\n _assertClass(board, Board);\n wasm.painter_draw(this.ptr, board.ptr);\n }\n}\n/**\n* Game piece given by its team and strength (normal or kinged)\n*/\nexport class Piece {\n\n static __wrap(ptr) {\n const obj = Object.create(Piece.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_piece_free(ptr);\n }\n /**\n * @returns {number}\n */\n get team() {\n const ret = wasm.__wbg_get_piece_team(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set team(arg0) {\n wasm.__wbg_set_piece_team(this.ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get strength() {\n const ret = wasm.__wbg_get_piece_strength(this.ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set strength(arg0) {\n wasm.__wbg_set_piece_strength(this.ptr, arg0);\n }\n /**\n * @param {number} team\n * @param {number} strength\n */\n constructor(team, strength) {\n const ret = wasm.piece_new(team, strength);\n return Piece.__wrap(ret);\n }\n}\n/**\n* Board squares given by a state and a possible occupying game piece\n*/\nexport class Square {\n\n static __wrap(ptr) {\n const obj = Object.create(Square.prototype);\n obj.ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.ptr;\n this.ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_square_free(ptr);\n }\n /**\n * Game piece if square is occupied\n * @returns {Piece | undefined}\n */\n get occupant() {\n const ret = wasm.__wbg_get_square_occupant(this.ptr);\n return ret === 0 ? undefined : Piece.__wrap(ret);\n }\n /**\n * Game piece if square is occupied\n * @param {Piece | undefined} arg0\n */\n set occupant(arg0) {\n let ptr0 = 0;\n if (!isLikeNone(arg0)) {\n _assertClass(arg0, Piece);\n ptr0 = arg0.ptr;\n arg0.ptr = 0;\n }\n wasm.__wbg_set_square_occupant(this.ptr, ptr0);\n }\n /**\n * Description of whether the square is occupied or an unplayable, i.e. off-lattice square\n * @returns {number}\n */\n get state() {\n const ret = wasm.__wbg_get_square_state(this.ptr);\n return ret >>> 0;\n }\n /**\n * Description of whether the square is occupied or an unplayable, i.e. off-lattice square\n * @param {number} arg0\n */\n set state(arg0) {\n wasm.__wbg_set_square_state(this.ptr, arg0);\n }\n /**\n * Standard constructor function to form square from state and occupant\n * @param {number} state\n * @param {Piece | undefined} occupant\n */\n constructor(state, occupant) {\n let ptr0 = 0;\n if (!isLikeNone(occupant)) {\n _assertClass(occupant, Piece);\n ptr0 = occupant.ptr;\n occupant.ptr = 0;\n }\n const ret = wasm.square_new(state, ptr0);\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed piece square by team and strength\n * @param {number} team\n * @param {number} strength\n * @returns {Square}\n */\n static pc(team, strength) {\n const ret = wasm.square_pc(team, strength);\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed empty square\n * @returns {Square}\n */\n static empty() {\n const ret = wasm.square_empty();\n return Square.__wrap(ret);\n }\n /**\n * Helper function for a well-formed unplayable square\n * @returns {Square}\n */\n static unplay() {\n const ret = wasm.square_unplay();\n return Square.__wrap(ret);\n }\n}\n\nexport function __wbindgen_object_drop_ref(arg0) {\n takeObject(arg0);\n};\n\nexport function __wbindgen_string_new(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_abda76e883ba8a5f() {\n const ret = new Error();\n return addHeapObject(ret);\n};\n\nexport function __wbg_stack_658279fe44541cf6(arg0, arg1) {\n const ret = getObject(arg1).stack;\n const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nexport function __wbg_error_f851667af71bcfc6(arg0, arg1) {\n try {\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(arg0, arg1);\n }\n};\n\nexport function __wbg_self_7eede1f4488bf346() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_crypto_c909fb428dcbddb6(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nexport function __wbg_msCrypto_511eefefbfc70ae4(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_is_undefined(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n};\n\nexport function __wbg_require_900d5c3984fe7703(arg0, arg1, arg2) {\n const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_307049345d0bd88c(arg0) {\n const ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_cd175915511f705e(arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n};\n\nexport function __wbg_randomFillSync_85b3f4c52c56c313(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n};\n\nexport function __wbg_static_accessor_MODULE_ef3aa2eb251158a5() {\n const ret = module;\n return addHeapObject(ret);\n};\n\nexport function __wbg_instanceof_Window_acc97ff9f5d2c7b4(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Window;\n } catch {\n result = false;\n }\n const ret = result;\n return ret;\n};\n\nexport function __wbg_document_3ead31dbcad65886(arg0) {\n const ret = getObject(arg0).document;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_getElementById_3a708b83e4f034d7(arg0, arg1, arg2) {\n const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_error_ef9a0be47931175f(arg0) {\n console.error(getObject(arg0));\n};\n\nexport function __wbg_log_4b5638ad60bdc54a(arg0) {\n console.log(getObject(arg0));\n};\n\nexport function __wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof CanvasRenderingContext2D;\n } catch {\n result = false;\n }\n const ret = result;\n return ret;\n};\n\nexport function __wbg_setstrokeStyle_899ea3720dae323b(arg0, arg1) {\n getObject(arg0).strokeStyle = getObject(arg1);\n};\n\nexport function __wbg_setfillStyle_53ccf2a9886c1c4d(arg0, arg1) {\n getObject(arg0).fillStyle = getObject(arg1);\n};\n\nexport function __wbg_setlineWidth_64004648773fed7a(arg0, arg1) {\n getObject(arg0).lineWidth = arg1;\n};\n\nexport function __wbg_beginPath_4e91b7092d0d33d9(arg0) {\n getObject(arg0).beginPath();\n};\n\nexport function __wbg_fill_8ec436f419a0d161(arg0) {\n getObject(arg0).fill();\n};\n\nexport function __wbg_stroke_85dee7d87c4a6ead(arg0) {\n getObject(arg0).stroke();\n};\n\nexport function __wbg_arc_30e550c408f151ac() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {\n getObject(arg0).arc(arg1, arg2, arg3, arg4, arg5);\n}, arguments) };\n\nexport function __wbg_fillRect_c7a19e13c5242507(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).fillRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_strokeRect_972fbfb664182aea(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_instanceof_HtmlCanvasElement_97761617af6ea089(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof HTMLCanvasElement;\n } catch {\n result = false;\n }\n const ret = result;\n return ret;\n};\n\nexport function __wbg_setwidth_afb418d3fbf71ba7(arg0, arg1) {\n getObject(arg0).width = arg1 >>> 0;\n};\n\nexport function __wbg_setheight_3eb8729b59493242(arg0, arg1) {\n getObject(arg0).height = arg1 >>> 0;\n};\n\nexport function __wbg_getContext_4d5e97892c1b206a() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_newnoargs_b5b063fc6c2f0376(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nexport function __wbg_call_97ae9d8645dc388b() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_self_6d479506f72c6a71() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_window_f2557cc78490aceb() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_globalThis_7f206bda628d5286() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_global_ba75c50d1cf384f4() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_buffer_3f3d764d4747d564(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_8c3f0052272a457a(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nexport function __wbg_set_83db9690f9353e79(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nexport function __wbg_length_9e1ae1900cb0fbd5(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n};\n\nexport function __wbg_newwithlength_f5933855e4f48a19(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbg_subarray_58ad4efbb5bcb886(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_object_clone_ref(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_debug_string(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n getInt32Memory0()[arg0 / 4 + 1] = len0;\n getInt32Memory0()[arg0 / 4 + 0] = ptr0;\n};\n\nexport function __wbindgen_throw(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nexport function __wbindgen_memory() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n};\n\n","import { Game, Board, BrdIdx, Painter, Team, init_wasm, Moveable, SquareState, Square } from \"draught\";\n// import { memory } from \"draught/draught_bg.wasm\";\n\n///////////////////\n// CONSTS\n///////////////////\n\nconst CANVAS_WIDTH = 720;\nconst CANVAS_HEIGHT = 720;\n\nvar BOARD_WIDTH = 8;\nvar BOARD_HEIGHT = 8;\n\nvar PIECE_ROWS = 3;\nvar SEARCH_DEPTH = 4;\nvar PERFECT_CHANCE = 0.5;\n\nconst STATUS_TIMEOUT = 3000;\nconst WON_TIMEOUT = 3000;\n\nconst GameState = {\n HUMAN_TURN: {\n THINKING: \"human_turn.thinking\",\n FROM_SELECTED: \"human_turn.from_selected\"\n },\n AI_TURN: \"ai_turn\"\n}\n\n//////////////////\n// GAME STUFF\n//////////////////\n\ninit_wasm();\n\n// let board = new Board(BOARD_WIDTH, BOARD_HEIGHT, Team.Black);\n\nconst statusText = document.getElementById(\"status-p\");\nconst statusAlert = document.getElementById(\"status-d\");\nconst teamText = document.getElementById(\"team-p\");\nconst nodeCountText = document.getElementById(\"node-count\");\nconst winningText = document.getElementById(\"winning-p\");\n\nconst startBtn = document.getElementById(\"startBtn\");\nstartBtn.onclick = start_game;\n\nlet wonTimeout = null;\nlet statusTimeout = null;\nlet setStatus = setStatusAlert;\n\nlet current_state = GameState.HUMAN_TURN.THINKING;\n\nlet game = null;\nlet painter = null;\n\nlet clicks = [];\n\nstart_game();\n\n/////////////////\n// CANVAS\n/////////////////\n\nconst canvas = document.getElementById(\"game-canvas\");\ncanvas.addEventListener(\"click\", (event) => {\n var mousepos = getMousePos(canvas, event);\n // console.log(mousepos);\n var cell = new BrdIdx(\n Math.floor((mousepos.y / canvas.clientHeight) * BOARD_HEIGHT),\n Math.floor((mousepos.x / canvas.clientWidth) * BOARD_WIDTH),\n );\n // console.log(cell);\n process_canvas_click(cell);\n});\n\n////////////////\n// FUNCS\n////////////////\n\nfunction start_game() {\n game = new Game(BOARD_WIDTH, BOARD_HEIGHT, PIECE_ROWS, Team.Black, SEARCH_DEPTH);\n painter = new Painter(CANVAS_WIDTH, CANVAS_HEIGHT, \"game-canvas\");\n game.set_painter(painter);\n game.draw();\n\n clearInterval(wonTimeout);\n updateTeamText();\n updateWinningText();\n clicks = [];\n current_state = GameState.HUMAN_TURN.THINKING;\n}\n\nfunction process_canvas_click(cell_coord) {\n\n switch(current_state) {\n // first click of a move\n case GameState.HUMAN_TURN.THINKING:\n if (game.current_cell_state(cell_coord).state != SquareState.Occupied ) {\n return;\n }\n\n if (game.current_cell_state(cell_coord).occupant.team != game.current_turn() ) {\n return;\n }\n\n // console.log(\"Your turn, first piece picked\");\n\n clicks.push(cell_coord);\n current_state = GameState.HUMAN_TURN.FROM_SELECTED;\n game.set_selected(cell_coord);\n game.draw();\n \n break;\n \n // second click of a move\n case GameState.HUMAN_TURN.FROM_SELECTED:\n\n // second click is different to first, process as move\n // otherwise, will skip straight to clean up (clear selected and clicks) \n if (!clicks[0].eq(cell_coord)) {\n\n if (game.current_cell_state(cell_coord).state != SquareState.Empty ) {\n return;\n }\n \n // console.log(\"Your turn, first piece already picked, picking second\");\n \n clicks.push(cell_coord);\n \n if (clicks.length != 2) {\n setStatus(`Error: wrong number of clicks to process ${clicks.length}`);\n console.error(`Error: wrong number of clicks to process ${clicks.length}`);\n \n return;\n }\n\n let status = game.make_move(clicks[0], clicks[1]);\n\n switch(status) {\n case Moveable.Allowed:\n\n if (aiCheckBox.checked && game.has_won() === undefined) {\n\n let start = performance.now();\n\n game.ai_move();\n\n let end = performance.now();\n\n nodeCountText.innerText = `searched ${game.last_node_count.toLocaleString(\"en-GB\")} possible moves in ${(end - start).toLocaleString()}ms`;\n }\n\n break;\n case Moveable.IllegalTrajectory:\n setStatus(\"You can't move like that!\");\n break;\n case Moveable.JumpingSameTeam:\n setStatus(\"You can't jump your own piece!\");\n break;\n case Moveable.NoJumpablePiece:\n setStatus(\"There's nothing to jump!\");\n break;\n case Moveable.OccupiedDest:\n setStatus(\"There's a piece there!\");\n break;\n case Moveable.OutOfBounds:\n setStatus(\"That square's not on the board! (how have you managed that?)\");\n break;\n case Moveable.UnoccupiedSrc:\n setStatus(\"There's no piece to move!\");\n break;\n case Moveable.Unplayable:\n setStatus(\"That's not a playable square!\");\n break;\n case Moveable.WrongTeamSrc:\n setStatus(\"That's not your piece!\");\n break;\n }\n \n }\n\n game.clear_selected();\n game.draw();\n clicks = [];\n current_state = GameState.HUMAN_TURN.THINKING;\n \n break;\n case GameState.AI_TURN:\n console.log(\"It's the AI's turn!\");\n break;\n }\n\n updateTeamText();\n updateWinningText();\n checkWon();\n}\n\nfunction getMousePos(canvas, evt) {\n var rect = canvas.getBoundingClientRect();\n return {\n x: evt.clientX - rect.left,\n y: evt.clientY - rect.top\n };\n}\n\nfunction setStatusText(txt, hide = true) {\n if(statusTimeout != null) {\n clearInterval(statusTimeout);\n }\n\n statusText.innerText = txt;\n\n if(hide) {\n statusTimeout = setTimeout(() => {\n statusText.innerText = \"\";\n }, STATUS_TIMEOUT);\n }\n}\n\nfunction setStatusAlert(txt, alertType = \"danger\", hide = true) {\n if(statusTimeout != null) {\n clearInterval(statusTimeout);\n }\n\n statusAlert.className = `alert alert-${alertType}`;\n statusAlert.innerText = txt;\n statusAlert.hidden = false;\n\n if(hide) {\n statusTimeout = setTimeout(() => {\n statusAlert.hidden = true;\n }, STATUS_TIMEOUT);\n }\n}\n\nfunction updateTeamText(){\n let team = game.current_turn();\n switch(team) {\n case Team.White:\n teamText.innerText = \"⚪ White ⚪\";\n break;\n case Team.Black:\n teamText.innerText = \"🔴 Black 🔴\";\n break;\n }\n}\n\nfunction updateWinningText(){\n \n switch(game.winning()) {\n case undefined:\n winningText.innerText = \"\";\n break;\n case Team.White:\n winningText.innerText = \"👑 White 👑\";\n break;\n case Team.Black:\n winningText.innerText = \"👑 Black 👑\";\n break;\n }\n}\n\nfunction checkWon() {\n\n switch(game.has_won()) {\n case undefined:\n break;\n case Team.White:\n setStatus(\"You Lost!\");\n wonTimeout = setInterval(() => {\n start_game();\n }, WON_TIMEOUT);\n break;\n case Team.Black:\n setStatus(\"You Won!\", \"success\");\n wonTimeout = setInterval(() => {\n start_game();\n }, WON_TIMEOUT);\n break;\n }\n}\n\n////////////////\n// UI\n////////////////\n\nconst widthBox = document.getElementById(\"width\");\n/**\n * Handler for width input box change, start a new game\n */\nconst onWidth = () => {\n\n BOARD_WIDTH = parseInt(widthBox.value);\n start_game();\n}\nwidthBox.onchange = onWidth;\nwidthBox.value = 8;\n\nconst heightBox = document.getElementById(\"height\");\n/**\n * Handler for height input box change, start a new game\n */\nconst onHeight = () => {\n\n BOARD_HEIGHT = parseInt(heightBox.value);\n pieceRowsBox.max = (BOARD_HEIGHT / 2) - 1;\n start_game();\n}\nheightBox.onchange = onHeight;\nheightBox.value = 8;\n\nconst pieceRowsBox = document.getElementById(\"play_rows\");\n/**\n * Handler for piece rows input box change, start a new game\n */\nconst onPieceRows = () => {\n\n PIECE_ROWS = parseInt(pieceRowsBox.value);\n start_game();\n}\npieceRowsBox.onchange = onPieceRows;\npieceRowsBox.value = 3;\n\nconst aiSearchDepthBox = document.getElementById(\"ai_search_depth\");\n/**\n * Handler for AI search depth input box change, start a new game\n */\nconst onAISearchDepth = () => {\n\n SEARCH_DEPTH = parseInt(aiSearchDepthBox.value);\n game.set_search_depth(SEARCH_DEPTH);\n\n if(SEARCH_DEPTH > 4) {\n setStatus(\"This increases thinking time exponentially, be careful (probably don't go past 6)\", \"warning\");\n }\n}\naiSearchDepthBox.onchange = onAISearchDepth;\naiSearchDepthBox.value = 4;\n\nconst aiCheckBox = document.getElementById(\"ai-checkbox\");\n/**\n * Handler for height input box change, get a new universe of given size\n */\nconst onAICheck = () => {\n \n}\naiCheckBox.onchange = onAICheck;\n// aiCheckBox.checked = true;\n\nconst aiPerfectChance = document.getElementById(\"ai_difficulty\");\n/**\n * Handler for piece rows input box change, start a new game\n */\nconst onPerfectChance = () => {\n\n PERFECT_CHANCE = parseInt(aiPerfectChance.value) / 100;\n game.set_perfect_chance(PERFECT_CHANCE);\n}\naiPerfectChance.onchange = onPerfectChance;\naiPerfectChance.value = 50;"],"names":["heap","Array","fill","undefined","getObject","idx","push","heap_next","length","dropObject","takeObject","ret","cachedTextDecoder","TextDecoder","module","require","ignoreBOM","fatal","decode","cachedUint8Memory0","Uint8Array","getUint8Memory0","byteLength","getStringFromWasm0","ptr","len","subarray","addHeapObject","obj","debugString","val","type","description","name","isArray","debug","i","builtInMatches","exec","toString","call","className","JSON","stringify","_","Error","message","stack","WASM_VECTOR_LEN","cachedTextEncoder","TextEncoder","encodeString","encodeInto","arg","view","buf","encode","set","read","written","passStringToWasm0","malloc","realloc","mem","offset","code","charCodeAt","slice","cachedInt32Memory0","Int32Array","getInt32Memory0","isLikeNone","x","_assertClass","instance","klass","init_wasm","handleError","f","args","apply","this","e","Object","freeze","Move","Jump","Team","Black","White","SquareState","Man","King","Empty","Occupied","Unplayable","Moveable","Allowed","UnoccupiedSrc","OccupiedDest","OutOfBounds","WrongTeamSrc","IllegalTrajectory","NoJumpablePiece","JumpingSameTeam","Board","static","create","prototype","__destroy_into_raw","free","width","arg0","height","current_turn","cell","Square","__wrap","set_cell","square","ptr0","grid_cell","BrdIdx","cell_index","row","col","cell_idx","board_index","can_move","from","to","ptr1","validate_man_move","from_square_occupant","Piece","ptr2","validate_king_move","jumpee_idx","cells","num_cells","num_pieces","num_player","team","score","cell_state","apply_move","apply_jump","king_row_idx","jumpee","from_occ","constructor","board","piece_rows","eq","other","Game","last_node_count","perfect_chance","current_board_cells","current_board_len","winning","has_won","current_cell_state","set_search_depth","search_depth","set_selected","set_perfect_chance","new_chance","clear_selected","make_move","execute_move","execute_jump","push_new_board","set_current","first_turn","canvas_id","canvas_width","canvas_height","len0","set_painter","value","Painter","draw","ai_move","canvas","set_square_outline","set_outline_width","set_draw_outline","reset_dimensions","validate_board_dim","strength","occupant","state","__wbindgen_object_drop_ref","__wbindgen_string_new","arg1","__wbg_new_abda76e883ba8a5f","__wbg_stack_658279fe44541cf6","__wbg_error_f851667af71bcfc6","console","error","__wbg_self_7eede1f4488bf346","self","arguments","__wbg_crypto_c909fb428dcbddb6","crypto","__wbg_msCrypto_511eefefbfc70ae4","msCrypto","__wbindgen_is_undefined","__wbg_require_900d5c3984fe7703","arg2","__wbg_getRandomValues_307049345d0bd88c","getRandomValues","__wbg_getRandomValues_cd175915511f705e","__wbg_randomFillSync_85b3f4c52c56c313","randomFillSync","__wbg_static_accessor_MODULE_ef3aa2eb251158a5","__wbg_instanceof_Window_acc97ff9f5d2c7b4","result","Window","__wbg_document_3ead31dbcad65886","document","__wbg_getElementById_3a708b83e4f034d7","getElementById","__wbg_error_ef9a0be47931175f","__wbg_log_4b5638ad60bdc54a","log","__wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622","CanvasRenderingContext2D","__wbg_setstrokeStyle_899ea3720dae323b","strokeStyle","__wbg_setfillStyle_53ccf2a9886c1c4d","fillStyle","__wbg_setlineWidth_64004648773fed7a","lineWidth","__wbg_beginPath_4e91b7092d0d33d9","beginPath","__wbg_fill_8ec436f419a0d161","__wbg_stroke_85dee7d87c4a6ead","stroke","__wbg_arc_30e550c408f151ac","arg3","arg4","arg5","arc","__wbg_fillRect_c7a19e13c5242507","fillRect","__wbg_strokeRect_972fbfb664182aea","strokeRect","__wbg_instanceof_HtmlCanvasElement_97761617af6ea089","HTMLCanvasElement","__wbg_setwidth_afb418d3fbf71ba7","__wbg_setheight_3eb8729b59493242","__wbg_getContext_4d5e97892c1b206a","getContext","__wbg_newnoargs_b5b063fc6c2f0376","Function","__wbg_call_97ae9d8645dc388b","__wbg_self_6d479506f72c6a71","__wbg_window_f2557cc78490aceb","window","__wbg_globalThis_7f206bda628d5286","globalThis","__wbg_global_ba75c50d1cf384f4","g","global","__wbg_buffer_3f3d764d4747d564","buffer","__wbg_new_8c3f0052272a457a","__wbg_set_83db9690f9353e79","__wbg_length_9e1ae1900cb0fbd5","__wbg_newwithlength_f5933855e4f48a19","__wbg_subarray_58ad4efbb5bcb886","__wbindgen_object_clone_ref","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_memory","CANVAS_WIDTH","CANVAS_HEIGHT","BOARD_WIDTH","BOARD_HEIGHT","PIECE_ROWS","SEARCH_DEPTH","PERFECT_CHANCE","STATUS_TIMEOUT","WON_TIMEOUT","GameState","HUMAN_TURN","THINKING","FROM_SELECTED","AI_TURN","statusAlert","teamText","nodeCountText","winningText","onclick","start_game","wonTimeout","statusTimeout","setStatus","setStatusAlert","current_state","game","painter","clicks","clearInterval","updateTeamText","updateWinningText","process_canvas_click","cell_coord","aiCheckBox","checked","start","performance","now","end","innerText","toLocaleString","checkWon","getMousePos","evt","rect","getBoundingClientRect","clientX","left","y","clientY","top","txt","alertType","hide","hidden","setTimeout","setInterval","addEventListener","event","mousepos","Math","floor","clientHeight","clientWidth","widthBox","onWidth","parseInt","onchange","heightBox","onHeight","pieceRowsBox","max","onPieceRows","aiSearchDepthBox","onAISearchDepth","onAICheck","aiPerfectChance","onPerfectChance"],"sourceRoot":""} \ No newline at end of file diff --git a/3779a77aa968ad91d198.module.wasm b/3779a77aa968ad91d198.module.wasm deleted file mode 100644 index 6c3a6e7..0000000 Binary files a/3779a77aa968ad91d198.module.wasm and /dev/null differ diff --git a/8a5d34b545c8f059a042.module.wasm b/8a5d34b545c8f059a042.module.wasm new file mode 100644 index 0000000..52a6212 Binary files /dev/null and b/8a5d34b545c8f059a042.module.wasm differ diff --git a/doc/ayu.css b/doc/ayu.css index 6ef5039..a9c9be0 100644 --- a/doc/ayu.css +++ b/doc/ayu.css @@ -1 +1 @@ - body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#14191f;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 #24292f;}.sidebar{scrollbar-color:#5c6773 #24292f;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current,.sidebar a:hover{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#14191f;}.sidebar-elems .location{color:#ff7733;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#5c6773;}.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}.sidebar a{color:#53b1db;}.sidebar a.current.type{color:#53b1db;}.sidebar a.current.associatedtype{color:#53b1db;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#c5c5c5;}.sidebar h2 a,.sidebar h3 a{color:white;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search,.search-input{background-color:#141920;border-color:#424c57;color:#c5c5c5;}.search-input{color:#ffffff;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help span.bottom,#help span.top{border-color:#5c6773;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.typedef,.content a.typedef,.block a.current.typedef{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-associatedtype:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}.sidebar a.current.enum{}.sidebar a.current.struct{}.sidebar a.current.foreigntype{}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{}.sidebar a.current.union{}.sidebar a.current.constant .sidebar a.current.static{}.sidebar a.current.primitive{}.sidebar a.current.externcrate .sidebar a.current.mod{}.sidebar a.current.trait{}.sidebar a.current.traitalias{}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{}.sidebar a.current.keyword{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow:inset 0 -1px 0 #5c6773;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file + body,#settings-menu #settings,#settings-menu #settings::before{background-color:#0f1419;color:#c5c5c5;}.setting-line .radio-line input{border-color:#c5c5c5;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px #0f1419;background-color:#ffb454;}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px #ffb454;}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px 0f1419,0 0 2px 2px #ffb454;}.setting-line .radio-line input:hover{border-color:#ffb454 !important;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:checked+.slider{background-color:#ffb454;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#14191f;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 #24292f;}.sidebar{scrollbar-color:#5c6773 #24292f;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current,.sidebar a:hover{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#14191f;}.sidebar-elems .location{color:#ff7733;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#5c6773;}.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}.sidebar a{color:#53b1db;}.sidebar a.current.type{color:#53b1db;}.sidebar a.current.associatedtype{color:#53b1db;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#c5c5c5;}.sidebar h2 a,.sidebar h3 a{color:white;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search,.search-input{background-color:#141920;border-color:#424c57 !important;}.search-input{color:#ffffff;}.module-item .stab,.import-item .stab{color:#000;}.stab.empty-impl{}.stab.unstable,.stab.deprecated,.stab.portability,.stab.empty-impl{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help span.bottom,#help span.top{border-color:#5c6773;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.typedef,.content a.typedef,.block a.current.typedef{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-associatedtype:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}.sidebar a.current.enum{}.sidebar a.current.struct{}.sidebar a.current.foreigntype{}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{}.sidebar a.current.union{}.sidebar a.current.constant .sidebar a.current.static{}.sidebar a.current.primitive{}.sidebar a.current.externcrate .sidebar a.current.mod{}.sidebar a.current.trait{}.sidebar a.current.traitalias{}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{}.sidebar a.current.keyword{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow:inset 0 -1px 0 #5c6773;}#settings-menu>a,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#settings-menu>a img{filter:invert(100);}#settings-menu #settings,#settings-menu #settings::before{border-color:#5c6773;}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#settings-menu>a:hover,#settings-menu>a:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/doc/brush.svg b/doc/brush.svg deleted file mode 100644 index ea266e8..0000000 --- a/doc/brush.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/doc/dark.css b/doc/dark.css index 34ae439..d8bd200 100644 --- a/doc/dark.css +++ b/doc/dark.css @@ -1 +1 @@ -body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#505050;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) #5a5a5a;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current,.sidebar a:hover{background:#444;}.source .sidebar{background-color:#565656;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#D2991D;}.sidebar a{color:#fdbf35;}.sidebar a.current.enum{color:#12ece2;}.sidebar a.current.struct{color:#12ece2;}.sidebar a.current.type{color:#12ece2;}.sidebar a.current.associatedtype{color:#fdbf35;}.sidebar a.current.foreigntype{color:#12ece2;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#0be900;}.sidebar a.current.union{color:#12ece2;}.sidebar a.current.constant .sidebar a.current.static{color:#fdbf35;}.sidebar a.current.primitive{color:#12ece2;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#fdbf35;}.sidebar a.current.trait{color:#cca7ff;}.sidebar a.current.traitalias{color:#cca7ff;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#32d479;}.sidebar a.current.keyword{color:#fdbf35;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#ddd;}.search-results a{color:#ddd;}a.test-arrow{color:#dedede;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search,.search-input{color:#111;background-color:#f0f0f0;border-color:#000;}.search-input{border-color:#e0e0e0;}.search-input:focus{border-color:#008dfd;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file +body,#settings-menu #settings,#settings-menu #settings::before{background-color:#353535;color:#ddd;}.setting-line .radio-line input{border-color:#ddd;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px #353535;background-color:#2196f3;}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px #2196f3;}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px #353535,0 0 2px 2px #2196f3;}.setting-line .radio-line input:hover{border-color:#2196f3 !important;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#505050;}.rust-logo{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) #5a5a5a;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current,.sidebar a:hover{background:#444;}.source .sidebar{background-color:#565656;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#D2991D;}.sidebar a{color:#fdbf35;}.sidebar a.current.enum{color:#12ece2;}.sidebar a.current.struct{color:#12ece2;}.sidebar a.current.type{color:#12ece2;}.sidebar a.current.associatedtype{color:#fdbf35;}.sidebar a.current.foreigntype{color:#12ece2;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#0be900;}.sidebar a.current.union{color:#12ece2;}.sidebar a.current.constant .sidebar a.current.static{color:#fdbf35;}.sidebar a.current.primitive{color:#12ece2;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#fdbf35;}.sidebar a.current.trait{color:#cca7ff;}.sidebar a.current.traitalias{color:#cca7ff;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#32d479;}.sidebar a.current.keyword{color:#fdbf35;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#ddd;}.search-results a{color:#ddd;}a.test-arrow{color:#dedede;}body.source .example-wrap pre.rust a{background:#333;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search,.search-input{color:#111;background-color:#f0f0f0;border-color:#f0f0f0 !important;}.search-input{border-color:#e0e0e0;}.search-input:focus{border-color:#008dfd;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#settings-menu #settings,#settings-menu #settings::before{border-color:#d2d2d2;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/doc/draught/all.html b/doc/draught/all.html index b4cf00e..d54c3c1 100644 --- a/doc/draught/all.html +++ b/doc/draught/all.html @@ -1,7 +1,8 @@ -List of all items in this crate -
\ No newline at end of file diff --git a/doc/draught/board/constant.STD_HEIGHT.html b/doc/draught/board/constant.STD_HEIGHT.html index a0537d5..ecc3327 100644 --- a/doc/draught/board/constant.STD_HEIGHT.html +++ b/doc/draught/board/constant.STD_HEIGHT.html @@ -1,9 +1,10 @@ -STD_HEIGHT in draught::board - Rust -
pub const STD_HEIGHT: usize = 8;
Expand description

Standard height of a checkers board is 8 squares

+
\ No newline at end of file diff --git a/doc/draught/board/constant.STD_WIDTH.html b/doc/draught/board/constant.STD_WIDTH.html index 56f1a7e..dcd3a08 100644 --- a/doc/draught/board/constant.STD_WIDTH.html +++ b/doc/draught/board/constant.STD_WIDTH.html @@ -1,9 +1,10 @@ -STD_WIDTH in draught::board - Rust -
pub const STD_WIDTH: usize = 8;
Expand description

Standard width of a checkers board is 8 squares

+
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_board_current_turn__const.html b/doc/draught/board/constant.__wbg_get_board_current_turn__const.html index ca6582d..0be4137 100644 --- a/doc/draught/board/constant.__wbg_get_board_current_turn__const.html +++ b/doc/draught/board/constant.__wbg_get_board_current_turn__const.html @@ -1,8 +1,9 @@ -__wbg_get_board_current_turn__const in draught::board - Rust -
const __wbg_get_board_current_turn__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_board_height__const.html b/doc/draught/board/constant.__wbg_get_board_height__const.html index 723c956..010ed44 100644 --- a/doc/draught/board/constant.__wbg_get_board_height__const.html +++ b/doc/draught/board/constant.__wbg_get_board_height__const.html @@ -1,8 +1,9 @@ -__wbg_get_board_height__const in draught::board - Rust -
const __wbg_get_board_height__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_board_width__const.html b/doc/draught/board/constant.__wbg_get_board_width__const.html index 73a93ba..b423e81 100644 --- a/doc/draught/board/constant.__wbg_get_board_width__const.html +++ b/doc/draught/board/constant.__wbg_get_board_width__const.html @@ -1,8 +1,9 @@ -__wbg_get_board_width__const in draught::board - Rust -
const __wbg_get_board_width__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_brdidx_col__const.html b/doc/draught/board/constant.__wbg_get_brdidx_col__const.html index 888f606..6905e95 100644 --- a/doc/draught/board/constant.__wbg_get_brdidx_col__const.html +++ b/doc/draught/board/constant.__wbg_get_brdidx_col__const.html @@ -1,8 +1,9 @@ -__wbg_get_brdidx_col__const in draught::board - Rust -
const __wbg_get_brdidx_col__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_brdidx_row__const.html b/doc/draught/board/constant.__wbg_get_brdidx_row__const.html index 6b99658..cb93086 100644 --- a/doc/draught/board/constant.__wbg_get_brdidx_row__const.html +++ b/doc/draught/board/constant.__wbg_get_brdidx_row__const.html @@ -1,8 +1,9 @@ -__wbg_get_brdidx_row__const in draught::board - Rust -
const __wbg_get_brdidx_row__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_piece_strength__const.html b/doc/draught/board/constant.__wbg_get_piece_strength__const.html index b873158..a9be5ec 100644 --- a/doc/draught/board/constant.__wbg_get_piece_strength__const.html +++ b/doc/draught/board/constant.__wbg_get_piece_strength__const.html @@ -1,8 +1,9 @@ -__wbg_get_piece_strength__const in draught::board - Rust -
const __wbg_get_piece_strength__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_piece_team__const.html b/doc/draught/board/constant.__wbg_get_piece_team__const.html index 3641c3b..80845c7 100644 --- a/doc/draught/board/constant.__wbg_get_piece_team__const.html +++ b/doc/draught/board/constant.__wbg_get_piece_team__const.html @@ -1,8 +1,9 @@ -__wbg_get_piece_team__const in draught::board - Rust -
const __wbg_get_piece_team__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_square_occupant__const.html b/doc/draught/board/constant.__wbg_get_square_occupant__const.html index ca48846..8745551 100644 --- a/doc/draught/board/constant.__wbg_get_square_occupant__const.html +++ b/doc/draught/board/constant.__wbg_get_square_occupant__const.html @@ -1,8 +1,9 @@ -__wbg_get_square_occupant__const in draught::board - Rust -
const __wbg_get_square_occupant__const: ();
\ No newline at end of file diff --git a/doc/draught/board/constant.__wbg_get_square_state__const.html b/doc/draught/board/constant.__wbg_get_square_state__const.html index 326cae6..e8684e2 100644 --- a/doc/draught/board/constant.__wbg_get_square_state__const.html +++ b/doc/draught/board/constant.__wbg_get_square_state__const.html @@ -1,8 +1,9 @@ -__wbg_get_square_state__const in draught::board - Rust -
const __wbg_get_square_state__const: ();
\ No newline at end of file diff --git a/doc/draught/board/enums/enum.MoveType.html b/doc/draught/board/enums/enum.MoveType.html index b3a3fda..553022a 100644 --- a/doc/draught/board/enums/enum.MoveType.html +++ b/doc/draught/board/enums/enum.MoveType.html @@ -1,48 +1,49 @@ -MoveType in draught::board::enums - Rust -
#[repr(u8)]
 pub enum MoveType {
     Move,
     Jump,
 }
Expand description

Move/Jump, for use in Move

-

Variants

Move

Jump

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

The wasm ABI type that this converts from when coming back out from the +

Variants

Move

Jump

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/enums/enum.Moveable.html b/doc/draught/board/enums/enum.Moveable.html index 2244bc2..4e3f99f 100644 --- a/doc/draught/board/enums/enum.Moveable.html +++ b/doc/draught/board/enums/enum.Moveable.html @@ -1,9 +1,10 @@ -Moveable in draught::board::enums - Rust -
#[repr(u8)]
 pub enum Moveable {
     Allowed,
@@ -16,40 +17,40 @@ pub enum Moveable {
     NoJumpablePiece,
     JumpingSameTeam,
 }
Expand description

Possible outcomes of trying to move

-

Variants

Allowed

UnoccupiedSrc

OccupiedDest

OutOfBounds

Unplayable

WrongTeamSrc

IllegalTrajectory

NoJumpablePiece

JumpingSameTeam

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

The wasm ABI type that this converts from when coming back out from the +

Variants

Allowed

UnoccupiedSrc

OccupiedDest

OutOfBounds

Unplayable

WrongTeamSrc

IllegalTrajectory

NoJumpablePiece

JumpingSameTeam

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/enums/enum.SquareState.html b/doc/draught/board/enums/enum.SquareState.html index 40fc57f..64073b6 100644 --- a/doc/draught/board/enums/enum.SquareState.html +++ b/doc/draught/board/enums/enum.SquareState.html @@ -1,51 +1,52 @@ -SquareState in draught::board::enums - Rust -
#[repr(u8)]
 pub enum SquareState {
     Empty,
     Occupied,
     Unplayable,
 }
Expand description

Model board square as Empty/Occupied/Unplayable

-

Variants

Empty

Occupied

Unplayable

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Formats the value using the given formatter. Read more

-

The wasm ABI type that this converts from when coming back out from the +

Variants

Empty

Occupied

Unplayable

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

Converts the given value to a String. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/enums/enum.Strength.html b/doc/draught/board/enums/enum.Strength.html index efee9f8..a707c41 100644 --- a/doc/draught/board/enums/enum.Strength.html +++ b/doc/draught/board/enums/enum.Strength.html @@ -1,48 +1,49 @@ -Strength in draught::board::enums - Rust -
#[repr(u8)]
 pub enum Strength {
     Man,
     King,
 }
Expand description

Man/King

-

Variants

Man

King

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

The wasm ABI type that this converts from when coming back out from the +

Variants

Man

King

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/enums/enum.Team.html b/doc/draught/board/enums/enum.Team.html index 8d26781..f83ca01 100644 --- a/doc/draught/board/enums/enum.Team.html +++ b/doc/draught/board/enums/enum.Team.html @@ -1,51 +1,52 @@ -Team in draught::board::enums - Rust -
#[repr(u8)]
 pub enum Team {
     Black,
     White,
 }
Expand description

Black/White

Variants

Black

White

Implementations

Get opposing team

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Formats the value using the given formatter. Read more

-

The wasm ABI type that this converts from when coming back out from the +

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

Converts the given value to a String. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/enums/index.html b/doc/draught/board/enums/index.html index ebb2a69..f54afbb 100644 --- a/doc/draught/board/enums/index.html +++ b/doc/draught/board/enums/index.html @@ -1,14 +1,15 @@ -draught::board::enums - Rust -

Enums

Move/Jump, for use in Move

Possible outcomes of trying to move

Model board square as Empty/Occupied/Unplayable

Man/King

Black/White

-
+
\ No newline at end of file diff --git a/doc/draught/board/enums/sidebar-items.js b/doc/draught/board/enums/sidebar-items.js index 17a2275..e0939a1 100644 --- a/doc/draught/board/enums/sidebar-items.js +++ b/doc/draught/board/enums/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"enum":[["MoveType","Move/Jump, for use in Move"],["Moveable","Possible outcomes of trying to move"],["SquareState","Model board square as Empty/Occupied/Unplayable"],["Strength","Man/King"],["Team","Black/White"]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":[["MoveType","Move/Jump, for use in Move"],["Moveable","Possible outcomes of trying to move"],["SquareState","Model board square as Empty/Occupied/Unplayable"],["Strength","Man/King"],["Team","Black/White"]]}; \ No newline at end of file diff --git a/doc/draught/board/index.html b/doc/draught/board/index.html index 4e3532a..d26c3cf 100644 --- a/doc/draught/board/index.html +++ b/doc/draught/board/index.html @@ -1,9 +1,10 @@ -draught::board - Rust -
Expand description

Board module for components related to the checkers board and game structure

Modules

Structs

@@ -15,5 +16,5 @@

Constants

+
\ No newline at end of file diff --git a/doc/draught/board/iter/index.html b/doc/draught/board/iter/index.html index a8f34fe..082efca 100644 --- a/doc/draught/board/iter/index.html +++ b/doc/draught/board/iter/index.html @@ -1,9 +1,10 @@ -draught::board::iter - Rust -
+
\ No newline at end of file diff --git a/doc/draught/board/iter/sidebar-items.js b/doc/draught/board/iter/sidebar-items.js index e395733..cf0f846 100644 --- a/doc/draught/board/iter/sidebar-items.js +++ b/doc/draught/board/iter/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"struct":[["PieceIterator",""],["RowIndexIterator",""],["RowSquareIterator",""]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"struct":[["PieceIterator",""],["RowIndexIterator",""],["RowSquareIterator",""]]}; \ No newline at end of file diff --git a/doc/draught/board/iter/struct.PieceIterator.html b/doc/draught/board/iter/struct.PieceIterator.html index 11ba5e0..4be9e37 100644 --- a/doc/draught/board/iter/struct.PieceIterator.html +++ b/doc/draught/board/iter/struct.PieceIterator.html @@ -1,141 +1,142 @@ -PieceIterator in draught::board::iter - Rust -
pub struct PieceIterator<'a> {
     board: &'a Board,
-    index_cursor: usize,
-}

Fields

board: &'a Boardindex_cursor: usize

Implementations

Trait Implementations

Get next item from the iterator

-

The type of the elements being iterated over.

-

Returns the bounds on the remaining length of the iterator. Read more

-

Consumes the iterator, counting the number of iterations and returning it. Read more

-

Consumes the iterator, returning the last element. Read more

-
🔬 This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator by n elements. Read more

-

Returns the nth element of the iterator. Read more

-

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more

-

Takes two iterators and creates a new iterator over both in sequence. Read more

-

‘Zips up’ two iterators into a single iterator of pairs. Read more

-
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places a copy of separator between adjacent -items of the original iterator. Read more

-
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more

-

Takes a closure and creates an iterator which calls that closure on each -element. Read more

-

Calls a closure on each element of an iterator. Read more

-

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more

-

Creates an iterator that both filters and maps. Read more

-

Creates an iterator which gives the current iteration count as well as -the next value. Read more

-

Creates an iterator which can use the peek and peek_mut methods + index_cursor: usize, +}

Fields

board: &'a Boardindex_cursor: usize

Implementations

Trait Implementations

Get next item from the iterator

+

The type of the elements being iterated over.

+

Returns the bounds on the remaining length of the iterator. Read more

+

Consumes the iterator, counting the number of iterations and returning it. Read more

+

Consumes the iterator, returning the last element. Read more

+
🔬 This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator by n elements. Read more

+

Returns the nth element of the iterator. Read more

+

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more

+

Takes two iterators and creates a new iterator over both in sequence. Read more

+

‘Zips up’ two iterators into a single iterator of pairs. Read more

+
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places a copy of separator between adjacent +items of the original iterator. Read more

+
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more

+

Takes a closure and creates an iterator which calls that closure on each +element. Read more

+

Calls a closure on each element of an iterator. Read more

+

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more

+

Creates an iterator that both filters and maps. Read more

+

Creates an iterator which gives the current iteration count as well as +the next value. Read more

+

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more

-

Creates an iterator that skips elements based on a predicate. Read more

-

Creates an iterator that yields elements based on a predicate. Read more

-

Creates an iterator that both yields elements based on a predicate and maps. Read more

-

Creates an iterator that skips the first n elements. Read more

-

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more

-

An iterator adapter similar to fold that holds internal state and -produces a new iterator. Read more

-

Creates an iterator that works like map, but flattens nested structure. Read more

-

Creates an iterator that flattens nested structure. Read more

-

Creates an iterator which ends after the first None. Read more

-

Does something with each element of an iterator, passing the value on. Read more

-

Borrows an iterator, rather than consuming it. Read more

-

Transforms an iterator into a collection. Read more

-
🔬 This is a nightly-only experimental API. (iterator_try_collect)

Fallibly transforms an iterator into a collection, short circuiting if -a failure is encountered. Read more

-
🔬 This is a nightly-only experimental API. (iter_collect_into)

Collects all the items from an iterator into a collection. Read more

-

Consumes an iterator, creating two collections from it. Read more

-
🔬 This is a nightly-only experimental API. (iter_partition_in_place)

Reorders the elements of this iterator in-place according to the given predicate, +their documentation for more information. Read more

+

Creates an iterator that skips elements based on a predicate. Read more

+

Creates an iterator that yields elements based on a predicate. Read more

+

Creates an iterator that both yields elements based on a predicate and maps. Read more

+

Creates an iterator that skips the first n elements. Read more

+

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more

+

An iterator adapter similar to fold that holds internal state and +produces a new iterator. Read more

+

Creates an iterator that works like map, but flattens nested structure. Read more

+

Creates an iterator that flattens nested structure. Read more

+

Creates an iterator which ends after the first None. Read more

+

Does something with each element of an iterator, passing the value on. Read more

+

Borrows an iterator, rather than consuming it. Read more

+

Transforms an iterator into a collection. Read more

+
🔬 This is a nightly-only experimental API. (iterator_try_collect)

Fallibly transforms an iterator into a collection, short circuiting if +a failure is encountered. Read more

+
🔬 This is a nightly-only experimental API. (iter_collect_into)

Collects all the items from an iterator into a collection. Read more

+

Consumes an iterator, creating two collections from it. Read more

+
🔬 This is a nightly-only experimental API. (iter_partition_in_place)

Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. -Returns the number of true elements found. Read more

-
🔬 This is a nightly-only experimental API. (iter_is_partitioned)

Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more

-

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more

-

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more

-

Folds every element into an accumulator by applying an operation, -returning the final result. Read more

-

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more

-
🔬 This is a nightly-only experimental API. (iterator_try_reduce)

Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more

-

Tests if every element of the iterator matches a predicate. Read more

-

Tests if any element of the iterator matches a predicate. Read more

-

Searches for an element of an iterator that satisfies a predicate. Read more

-

Applies function to the elements of iterator and returns -the first non-none result. Read more

-
🔬 This is a nightly-only experimental API. (try_find)

Applies function to the elements of iterator and returns -the first true result or the first error. Read more

-

Searches for an element in an iterator, returning its index. Read more

-

Searches for an element in an iterator from the right, returning its -index. Read more

-

Returns the maximum element of an iterator. Read more

-

Returns the minimum element of an iterator. Read more

-

Returns the element that gives the maximum value from the -specified function. Read more

-

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more

-

Returns the element that gives the minimum value from the -specified function. Read more

-

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more

-

Reverses an iterator’s direction. Read more

-

Converts an iterator of pairs into a pair of containers. Read more

-

Creates an iterator which copies all of its elements. Read more

-

Creates an iterator which clones all of its elements. Read more

-

Repeats an iterator endlessly. Read more

-

Sums the elements of an iterator. Read more

-

Iterates over the entire iterator, multiplying all the elements Read more

-

Lexicographically compares the elements of this Iterator with those -of another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more

-

Lexicographically compares the elements of this Iterator with those -of another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more

-

Determines if the elements of this Iterator are equal to those of -another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more

-

Determines if the elements of this Iterator are unequal to those of -another. Read more

-

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given comparator function. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+Returns the number of true elements found. Read more

+
🔬 This is a nightly-only experimental API. (iter_is_partitioned)

Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more

+

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more

+

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more

+

Folds every element into an accumulator by applying an operation, +returning the final result. Read more

+

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more

+
🔬 This is a nightly-only experimental API. (iterator_try_reduce)

Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more

+

Tests if every element of the iterator matches a predicate. Read more

+

Tests if any element of the iterator matches a predicate. Read more

+

Searches for an element of an iterator that satisfies a predicate. Read more

+

Applies function to the elements of iterator and returns +the first non-none result. Read more

+
🔬 This is a nightly-only experimental API. (try_find)

Applies function to the elements of iterator and returns +the first true result or the first error. Read more

+

Searches for an element in an iterator, returning its index. Read more

+

Searches for an element in an iterator from the right, returning its +index. Read more

+

Returns the maximum element of an iterator. Read more

+

Returns the minimum element of an iterator. Read more

+

Returns the element that gives the maximum value from the +specified function. Read more

+

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more

+

Returns the element that gives the minimum value from the +specified function. Read more

+

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more

+

Reverses an iterator’s direction. Read more

+

Converts an iterator of pairs into a pair of containers. Read more

+

Creates an iterator which copies all of its elements. Read more

+

Creates an iterator which clones all of its elements. Read more

+

Repeats an iterator endlessly. Read more

+

Sums the elements of an iterator. Read more

+

Iterates over the entire iterator, multiplying all the elements Read more

+

Lexicographically compares the elements of this Iterator with those +of another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more

+

Lexicographically compares the elements of this Iterator with those +of another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more

+

Determines if the elements of this Iterator are equal to those of +another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more

+

Determines if the elements of this Iterator are unequal to those of +another. Read more

+

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given comparator function. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type of the elements being iterated over.

-

Which kind of iterator are we turning this into?

-

Creates an iterator from a value. Read more

-

Choose one element at random from the iterator. Read more

-

Collects values at random from the iterator into a supplied buffer +From<T> for U chooses to do.

+

The type of the elements being iterated over.

+

Which kind of iterator are we turning this into?

+

Creates an iterator from a value. Read more

+

Choose one element at random from the iterator. Read more

+

Collects values at random from the iterator into a supplied buffer until that buffer is filled. Read more

-

Collects amount values at random from the iterator into a vector. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

Collects amount values at random from the iterator into a vector. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/iter/struct.RowIndexIterator.html b/doc/draught/board/iter/struct.RowIndexIterator.html index dccb36c..7d596e3 100644 --- a/doc/draught/board/iter/struct.RowIndexIterator.html +++ b/doc/draught/board/iter/struct.RowIndexIterator.html @@ -1,141 +1,142 @@ -RowIndexIterator in draught::board::iter - Rust -
pub struct RowIndexIterator<'a> {
     board: &'a Board,
-    row_cursor: usize,
-}

Fields

board: &'a Boardrow_cursor: usize

Implementations

Trait Implementations

Get next item from the iterator

-

The type of the elements being iterated over.

-

Returns the bounds on the remaining length of the iterator. Read more

-

Consumes the iterator, counting the number of iterations and returning it. Read more

-

Consumes the iterator, returning the last element. Read more

-
🔬 This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator by n elements. Read more

-

Returns the nth element of the iterator. Read more

-

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more

-

Takes two iterators and creates a new iterator over both in sequence. Read more

-

‘Zips up’ two iterators into a single iterator of pairs. Read more

-
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places a copy of separator between adjacent -items of the original iterator. Read more

-
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more

-

Takes a closure and creates an iterator which calls that closure on each -element. Read more

-

Calls a closure on each element of an iterator. Read more

-

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more

-

Creates an iterator that both filters and maps. Read more

-

Creates an iterator which gives the current iteration count as well as -the next value. Read more

-

Creates an iterator which can use the peek and peek_mut methods + row_cursor: usize, +}

Fields

board: &'a Boardrow_cursor: usize

Implementations

Trait Implementations

Get next item from the iterator

+

The type of the elements being iterated over.

+

Returns the bounds on the remaining length of the iterator. Read more

+

Consumes the iterator, counting the number of iterations and returning it. Read more

+

Consumes the iterator, returning the last element. Read more

+
🔬 This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator by n elements. Read more

+

Returns the nth element of the iterator. Read more

+

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more

+

Takes two iterators and creates a new iterator over both in sequence. Read more

+

‘Zips up’ two iterators into a single iterator of pairs. Read more

+
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places a copy of separator between adjacent +items of the original iterator. Read more

+
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more

+

Takes a closure and creates an iterator which calls that closure on each +element. Read more

+

Calls a closure on each element of an iterator. Read more

+

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more

+

Creates an iterator that both filters and maps. Read more

+

Creates an iterator which gives the current iteration count as well as +the next value. Read more

+

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more

-

Creates an iterator that skips elements based on a predicate. Read more

-

Creates an iterator that yields elements based on a predicate. Read more

-

Creates an iterator that both yields elements based on a predicate and maps. Read more

-

Creates an iterator that skips the first n elements. Read more

-

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more

-

An iterator adapter similar to fold that holds internal state and -produces a new iterator. Read more

-

Creates an iterator that works like map, but flattens nested structure. Read more

-

Creates an iterator that flattens nested structure. Read more

-

Creates an iterator which ends after the first None. Read more

-

Does something with each element of an iterator, passing the value on. Read more

-

Borrows an iterator, rather than consuming it. Read more

-

Transforms an iterator into a collection. Read more

-
🔬 This is a nightly-only experimental API. (iterator_try_collect)

Fallibly transforms an iterator into a collection, short circuiting if -a failure is encountered. Read more

-
🔬 This is a nightly-only experimental API. (iter_collect_into)

Collects all the items from an iterator into a collection. Read more

-

Consumes an iterator, creating two collections from it. Read more

-
🔬 This is a nightly-only experimental API. (iter_partition_in_place)

Reorders the elements of this iterator in-place according to the given predicate, +their documentation for more information. Read more

+

Creates an iterator that skips elements based on a predicate. Read more

+

Creates an iterator that yields elements based on a predicate. Read more

+

Creates an iterator that both yields elements based on a predicate and maps. Read more

+

Creates an iterator that skips the first n elements. Read more

+

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more

+

An iterator adapter similar to fold that holds internal state and +produces a new iterator. Read more

+

Creates an iterator that works like map, but flattens nested structure. Read more

+

Creates an iterator that flattens nested structure. Read more

+

Creates an iterator which ends after the first None. Read more

+

Does something with each element of an iterator, passing the value on. Read more

+

Borrows an iterator, rather than consuming it. Read more

+

Transforms an iterator into a collection. Read more

+
🔬 This is a nightly-only experimental API. (iterator_try_collect)

Fallibly transforms an iterator into a collection, short circuiting if +a failure is encountered. Read more

+
🔬 This is a nightly-only experimental API. (iter_collect_into)

Collects all the items from an iterator into a collection. Read more

+

Consumes an iterator, creating two collections from it. Read more

+
🔬 This is a nightly-only experimental API. (iter_partition_in_place)

Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. -Returns the number of true elements found. Read more

-
🔬 This is a nightly-only experimental API. (iter_is_partitioned)

Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more

-

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more

-

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more

-

Folds every element into an accumulator by applying an operation, -returning the final result. Read more

-

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more

-
🔬 This is a nightly-only experimental API. (iterator_try_reduce)

Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more

-

Tests if every element of the iterator matches a predicate. Read more

-

Tests if any element of the iterator matches a predicate. Read more

-

Searches for an element of an iterator that satisfies a predicate. Read more

-

Applies function to the elements of iterator and returns -the first non-none result. Read more

-
🔬 This is a nightly-only experimental API. (try_find)

Applies function to the elements of iterator and returns -the first true result or the first error. Read more

-

Searches for an element in an iterator, returning its index. Read more

-

Searches for an element in an iterator from the right, returning its -index. Read more

-

Returns the maximum element of an iterator. Read more

-

Returns the minimum element of an iterator. Read more

-

Returns the element that gives the maximum value from the -specified function. Read more

-

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more

-

Returns the element that gives the minimum value from the -specified function. Read more

-

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more

-

Reverses an iterator’s direction. Read more

-

Converts an iterator of pairs into a pair of containers. Read more

-

Creates an iterator which copies all of its elements. Read more

-

Creates an iterator which clones all of its elements. Read more

-

Repeats an iterator endlessly. Read more

-

Sums the elements of an iterator. Read more

-

Iterates over the entire iterator, multiplying all the elements Read more

-

Lexicographically compares the elements of this Iterator with those -of another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more

-

Lexicographically compares the elements of this Iterator with those -of another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more

-

Determines if the elements of this Iterator are equal to those of -another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more

-

Determines if the elements of this Iterator are unequal to those of -another. Read more

-

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given comparator function. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+Returns the number of true elements found. Read more

+
🔬 This is a nightly-only experimental API. (iter_is_partitioned)

Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more

+

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more

+

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more

+

Folds every element into an accumulator by applying an operation, +returning the final result. Read more

+

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more

+
🔬 This is a nightly-only experimental API. (iterator_try_reduce)

Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more

+

Tests if every element of the iterator matches a predicate. Read more

+

Tests if any element of the iterator matches a predicate. Read more

+

Searches for an element of an iterator that satisfies a predicate. Read more

+

Applies function to the elements of iterator and returns +the first non-none result. Read more

+
🔬 This is a nightly-only experimental API. (try_find)

Applies function to the elements of iterator and returns +the first true result or the first error. Read more

+

Searches for an element in an iterator, returning its index. Read more

+

Searches for an element in an iterator from the right, returning its +index. Read more

+

Returns the maximum element of an iterator. Read more

+

Returns the minimum element of an iterator. Read more

+

Returns the element that gives the maximum value from the +specified function. Read more

+

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more

+

Returns the element that gives the minimum value from the +specified function. Read more

+

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more

+

Reverses an iterator’s direction. Read more

+

Converts an iterator of pairs into a pair of containers. Read more

+

Creates an iterator which copies all of its elements. Read more

+

Creates an iterator which clones all of its elements. Read more

+

Repeats an iterator endlessly. Read more

+

Sums the elements of an iterator. Read more

+

Iterates over the entire iterator, multiplying all the elements Read more

+

Lexicographically compares the elements of this Iterator with those +of another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more

+

Lexicographically compares the elements of this Iterator with those +of another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more

+

Determines if the elements of this Iterator are equal to those of +another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more

+

Determines if the elements of this Iterator are unequal to those of +another. Read more

+

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given comparator function. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type of the elements being iterated over.

-

Which kind of iterator are we turning this into?

-

Creates an iterator from a value. Read more

-

Choose one element at random from the iterator. Read more

-

Collects values at random from the iterator into a supplied buffer +From<T> for U chooses to do.

+

The type of the elements being iterated over.

+

Which kind of iterator are we turning this into?

+

Creates an iterator from a value. Read more

+

Choose one element at random from the iterator. Read more

+

Collects values at random from the iterator into a supplied buffer until that buffer is filled. Read more

-

Collects amount values at random from the iterator into a vector. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

Collects amount values at random from the iterator into a vector. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/iter/struct.RowSquareIterator.html b/doc/draught/board/iter/struct.RowSquareIterator.html index 82413a5..dd42779 100644 --- a/doc/draught/board/iter/struct.RowSquareIterator.html +++ b/doc/draught/board/iter/struct.RowSquareIterator.html @@ -1,141 +1,142 @@ -RowSquareIterator in draught::board::iter - Rust -
pub struct RowSquareIterator<'a> {
     board: &'a Board,
     index_iter: RowIndexIterator<'a>,
-}

Fields

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

Implementations

Trait Implementations

Get next item from the iterator

-

The type of the elements being iterated over.

-

Returns the bounds on the remaining length of the iterator. Read more

-

Consumes the iterator, counting the number of iterations and returning it. Read more

-

Consumes the iterator, returning the last element. Read more

-
🔬 This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator by n elements. Read more

-

Returns the nth element of the iterator. Read more

-

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more

-

Takes two iterators and creates a new iterator over both in sequence. Read more

-

‘Zips up’ two iterators into a single iterator of pairs. Read more

-
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places a copy of separator between adjacent -items of the original iterator. Read more

-
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more

-

Takes a closure and creates an iterator which calls that closure on each -element. Read more

-

Calls a closure on each element of an iterator. Read more

-

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more

-

Creates an iterator that both filters and maps. Read more

-

Creates an iterator which gives the current iteration count as well as -the next value. Read more

-

Creates an iterator which can use the peek and peek_mut methods +}

Fields

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

Implementations

Trait Implementations

Get next item from the iterator

+

The type of the elements being iterated over.

+

Returns the bounds on the remaining length of the iterator. Read more

+

Consumes the iterator, counting the number of iterations and returning it. Read more

+

Consumes the iterator, returning the last element. Read more

+
🔬 This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator by n elements. Read more

+

Returns the nth element of the iterator. Read more

+

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more

+

Takes two iterators and creates a new iterator over both in sequence. Read more

+

‘Zips up’ two iterators into a single iterator of pairs. Read more

+
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places a copy of separator between adjacent +items of the original iterator. Read more

+
🔬 This is a nightly-only experimental API. (iter_intersperse)

Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more

+

Takes a closure and creates an iterator which calls that closure on each +element. Read more

+

Calls a closure on each element of an iterator. Read more

+

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more

+

Creates an iterator that both filters and maps. Read more

+

Creates an iterator which gives the current iteration count as well as +the next value. Read more

+

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more

-

Creates an iterator that skips elements based on a predicate. Read more

-

Creates an iterator that yields elements based on a predicate. Read more

-

Creates an iterator that both yields elements based on a predicate and maps. Read more

-

Creates an iterator that skips the first n elements. Read more

-

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more

-

An iterator adapter similar to fold that holds internal state and -produces a new iterator. Read more

-

Creates an iterator that works like map, but flattens nested structure. Read more

-

Creates an iterator that flattens nested structure. Read more

-

Creates an iterator which ends after the first None. Read more

-

Does something with each element of an iterator, passing the value on. Read more

-

Borrows an iterator, rather than consuming it. Read more

-

Transforms an iterator into a collection. Read more

-
🔬 This is a nightly-only experimental API. (iterator_try_collect)

Fallibly transforms an iterator into a collection, short circuiting if -a failure is encountered. Read more

-
🔬 This is a nightly-only experimental API. (iter_collect_into)

Collects all the items from an iterator into a collection. Read more

-

Consumes an iterator, creating two collections from it. Read more

-
🔬 This is a nightly-only experimental API. (iter_partition_in_place)

Reorders the elements of this iterator in-place according to the given predicate, +their documentation for more information. Read more

+

Creates an iterator that skips elements based on a predicate. Read more

+

Creates an iterator that yields elements based on a predicate. Read more

+

Creates an iterator that both yields elements based on a predicate and maps. Read more

+

Creates an iterator that skips the first n elements. Read more

+

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more

+

An iterator adapter similar to fold that holds internal state and +produces a new iterator. Read more

+

Creates an iterator that works like map, but flattens nested structure. Read more

+

Creates an iterator that flattens nested structure. Read more

+

Creates an iterator which ends after the first None. Read more

+

Does something with each element of an iterator, passing the value on. Read more

+

Borrows an iterator, rather than consuming it. Read more

+

Transforms an iterator into a collection. Read more

+
🔬 This is a nightly-only experimental API. (iterator_try_collect)

Fallibly transforms an iterator into a collection, short circuiting if +a failure is encountered. Read more

+
🔬 This is a nightly-only experimental API. (iter_collect_into)

Collects all the items from an iterator into a collection. Read more

+

Consumes an iterator, creating two collections from it. Read more

+
🔬 This is a nightly-only experimental API. (iter_partition_in_place)

Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. -Returns the number of true elements found. Read more

-
🔬 This is a nightly-only experimental API. (iter_is_partitioned)

Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more

-

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more

-

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more

-

Folds every element into an accumulator by applying an operation, -returning the final result. Read more

-

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more

-
🔬 This is a nightly-only experimental API. (iterator_try_reduce)

Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more

-

Tests if every element of the iterator matches a predicate. Read more

-

Tests if any element of the iterator matches a predicate. Read more

-

Searches for an element of an iterator that satisfies a predicate. Read more

-

Applies function to the elements of iterator and returns -the first non-none result. Read more

-
🔬 This is a nightly-only experimental API. (try_find)

Applies function to the elements of iterator and returns -the first true result or the first error. Read more

-

Searches for an element in an iterator, returning its index. Read more

-

Searches for an element in an iterator from the right, returning its -index. Read more

-

Returns the maximum element of an iterator. Read more

-

Returns the minimum element of an iterator. Read more

-

Returns the element that gives the maximum value from the -specified function. Read more

-

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more

-

Returns the element that gives the minimum value from the -specified function. Read more

-

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more

-

Reverses an iterator’s direction. Read more

-

Converts an iterator of pairs into a pair of containers. Read more

-

Creates an iterator which copies all of its elements. Read more

-

Creates an iterator which clones all of its elements. Read more

-

Repeats an iterator endlessly. Read more

-

Sums the elements of an iterator. Read more

-

Iterates over the entire iterator, multiplying all the elements Read more

-

Lexicographically compares the elements of this Iterator with those -of another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more

-

Lexicographically compares the elements of this Iterator with those -of another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more

-

Determines if the elements of this Iterator are equal to those of -another. Read more

-
🔬 This is a nightly-only experimental API. (iter_order_by)

Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more

-

Determines if the elements of this Iterator are unequal to those of -another. Read more

-

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more

-

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given comparator function. Read more

-
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+Returns the number of true elements found. Read more

+
🔬 This is a nightly-only experimental API. (iter_is_partitioned)

Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more

+

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more

+

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more

+

Folds every element into an accumulator by applying an operation, +returning the final result. Read more

+

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more

+
🔬 This is a nightly-only experimental API. (iterator_try_reduce)

Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more

+

Tests if every element of the iterator matches a predicate. Read more

+

Tests if any element of the iterator matches a predicate. Read more

+

Searches for an element of an iterator that satisfies a predicate. Read more

+

Applies function to the elements of iterator and returns +the first non-none result. Read more

+
🔬 This is a nightly-only experimental API. (try_find)

Applies function to the elements of iterator and returns +the first true result or the first error. Read more

+

Searches for an element in an iterator, returning its index. Read more

+

Searches for an element in an iterator from the right, returning its +index. Read more

+

Returns the maximum element of an iterator. Read more

+

Returns the minimum element of an iterator. Read more

+

Returns the element that gives the maximum value from the +specified function. Read more

+

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more

+

Returns the element that gives the minimum value from the +specified function. Read more

+

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more

+

Reverses an iterator’s direction. Read more

+

Converts an iterator of pairs into a pair of containers. Read more

+

Creates an iterator which copies all of its elements. Read more

+

Creates an iterator which clones all of its elements. Read more

+

Repeats an iterator endlessly. Read more

+

Sums the elements of an iterator. Read more

+

Iterates over the entire iterator, multiplying all the elements Read more

+

Lexicographically compares the elements of this Iterator with those +of another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more

+

Lexicographically compares the elements of this Iterator with those +of another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more

+

Determines if the elements of this Iterator are equal to those of +another. Read more

+
🔬 This is a nightly-only experimental API. (iter_order_by)

Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more

+

Determines if the elements of this Iterator are unequal to those of +another. Read more

+

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more

+

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given comparator function. Read more

+
🔬 This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type of the elements being iterated over.

-

Which kind of iterator are we turning this into?

-

Creates an iterator from a value. Read more

-

Choose one element at random from the iterator. Read more

-

Collects values at random from the iterator into a supplied buffer +From<T> for U chooses to do.

+

The type of the elements being iterated over.

+

Which kind of iterator are we turning this into?

+

Creates an iterator from a value. Read more

+

Choose one element at random from the iterator. Read more

+

Collects values at random from the iterator into a supplied buffer until that buffer is filled. Read more

-

Collects amount values at random from the iterator into a vector. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

Collects amount values at random from the iterator into a vector. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/sidebar-items.js b/doc/draught/board/sidebar-items.js index 205487c..39d8652 100644 --- a/doc/draught/board/sidebar-items.js +++ b/doc/draught/board/sidebar-items.js @@ -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"],["__wbg_get_board_current_turn__const",""],["__wbg_get_board_height__const",""],["__wbg_get_board_width__const",""],["__wbg_get_brdidx_col__const",""],["__wbg_get_brdidx_row__const",""],["__wbg_get_piece_strength__const",""],["__wbg_get_piece_team__const",""],["__wbg_get_square_occupant__const",""],["__wbg_get_square_state__const",""]],"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"]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":[["STD_HEIGHT","Standard height of a checkers board is 8 squares"],["STD_WIDTH","Standard width of a checkers board is 8 squares"],["__wbg_get_board_current_turn__const",""],["__wbg_get_board_height__const",""],["__wbg_get_board_width__const",""],["__wbg_get_brdidx_col__const",""],["__wbg_get_brdidx_row__const",""],["__wbg_get_piece_strength__const",""],["__wbg_get_piece_team__const",""],["__wbg_get_square_occupant__const",""],["__wbg_get_square_state__const",""]],"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"]]}; \ No newline at end of file diff --git a/doc/draught/board/struct.Board.html b/doc/draught/board/struct.Board.html index 294dfed..bb750c0 100644 --- a/doc/draught/board/struct.Board.html +++ b/doc/draught/board/struct.Board.html @@ -1,109 +1,110 @@ -Board in draught::board - Rust -
pub struct Board {
-    cells: Vec<Square>,
-    pub width: usize,
-    pub height: usize,
+    cells: Vec<Square>,
+    pub width: usize,
+    pub height: usize,
     pub current_turn: Team,
 }
Expand description

Single state of a checkers board

-

Fields

cells: Vec<Square>

1D backing array of board squares for the 2D game board

-
width: usizeheight: usizecurrent_turn: Team

Implementations

Get a mutable reference to a board square by 1D array index

-

Get the 1D array indices for the diagonally adjacent squares of a given board square

+

Fields

cells: Vec<Square>

1D backing array of board squares for the 2D game board

+
width: usizeheight: usizecurrent_turn: Team

Implementations

Get a mutable reference to a board square by 1D array index

+

Get the 1D array indices for the diagonally adjacent squares of a given board square

Returns
-

None: If the given square is unplayable

+

None: If the given square is unplayable

Some(Vec): A variable length vector of 1D indices for diagonally adjacent squares. Vector may be between 1 and 4 items long depending on the location of the given square

-

Get a Direction structure for the diagonally adjacent squares of a given board square

+

Get a Direction structure for the diagonally adjacent squares of a given board square

Similar to the Board::adjacent_indices function with differently formatted results

Returns
-

None: If the given square is unplayable

+

None: If the given square is unplayable

Some(Direction): A Direction structure for the diagonally adjacent squares.

-

Filter an array of diagonal indices (Like those from Board::adjacent_indices, Board::jumpable_indices) for those that are legal for a team’s man, i.e. solely up or down the board

-

Get the 1D array indices for the diagonally jumpable squares of a given board square

+

Filter an array of diagonal indices (Like those from Board::adjacent_indices, Board::jumpable_indices) for those that are legal for a team’s man, i.e. solely up or down the board

+

Get the 1D array indices for the diagonally jumpable squares of a given board square

Returns
-

None: If the given square is unplayable

+

None: If the given square is unplayable

Some(Vec): A variable length vector of 1D indices for diagonally jumpable squares. Vector may be between 1 and 4 items long depending on the location of the given square

-

Get a Direction structure for the diagonally jumpable squares of a given board square

+

Get a Direction structure for the diagonally jumpable squares of a given board square

Similar to the Board::jumpable_indices function with differently formatted results

Returns
-

None: If the given square is unplayable

+

None: If the given square is unplayable

Some(Direction): A Direction structure for the diagonally jumpable squares.

-

Get the difference between two BrdIdx objects

-

Get a copy of a board square by 1D array index

-

Get a copy of a board square by 1D array index

+

Get the difference between two BrdIdx objects

+

Get a copy of a board square by 1D array index

+

Get a copy of a board square by 1D array index

Get a copy of a board square by 2D BrdIdx index

-

Transform a 2D row/column board index into a single 1D index for use with Board::cells

-

Similar to Board::cell_index but with a BrdIdx instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with Board::cells

-

Transform a 1D array index (for Board::cells) into a 2D game board index (by row/col)

+

Transform a 2D row/column board index into a single 1D index for use with Board::cells

+

Similar to Board::cell_index but with a BrdIdx instead of separate indices. Transform a 2D row/column board index into a single 1D index for use with Board::cells

+

Transform a 1D array index (for Board::cells) into a 2D game board index (by row/col)

Check whether a move given by source and destination indices is legal

Check that given move trajectory is valid for a man piece

Check that given move trajectory is valid for a king piece

-

Get cell index of jumpee square given from and to locations

-

Get a pointer to the backing array of board squares, Board::cells

-

Get the number of board squares

-

Get the number of remaining pieces

-

Get the number of remaining pieces for a player

-

Get the score value, Black - White pieces

-

Get the state of a board square by 1D array index

+

Get cell index of jumpee square given from and to locations

+

Get a pointer to the backing array of board squares, Board::cells

+

Get the number of board squares

+

Get the number of remaining pieces

+

Get the number of remaining pieces for a player

+

Get the score value, Black - White pieces

+

Get the state of a board square by 1D array index

Get new board derived from current with given move applied

Get new board derived from current with given jump applied

-

Get row index for current team, top row for black, bottom row for white

+

Get row index for current team, top row for black, bottom row for white

Unwrap the jumpee piece from the square and Board::check_jumpee_team with Moveable response

-

Check that the source piece and the jumpee are of opposing teams

+

Check that the source piece and the jumpee are of opposing teams

Check and apply king strength

-

Initialise a game board without game pieces

-

Reset the given board to a starting layout with 3 rows of opposing pieces

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

The wasm ABI type that this converts from when coming back out from the +

Initialise a game board without game pieces

+

Reset the given board to a starting layout with 3 rows of opposing pieces

+

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

The wasm ABI type references to Self are recovered from.

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

-

Same as RefFromWasmAbi::Abi

+

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

Converts the given value to a String. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.BrdIdx.html b/doc/draught/board/struct.BrdIdx.html index 066a5c9..0521701 100644 --- a/doc/draught/board/struct.BrdIdx.html +++ b/doc/draught/board/struct.BrdIdx.html @@ -1,59 +1,60 @@ -BrdIdx in draught::board - Rust -
pub struct BrdIdx {
-    pub row: usize,
-    pub col: usize,
+    pub row: usize,
+    pub col: usize,
 }
Expand description

Rank 2 tensor index to identify a board square by row and column

-

Fields

row: usizecol: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

The wasm ABI type that this converts from when coming back out from the +

Fields

row: usizecol: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

The wasm ABI type references to Self are recovered from.

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

-

Same as RefFromWasmAbi::Abi

+

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

Converts the given value to a String. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.Direction.html b/doc/draught/board/struct.Direction.html index 709da00..8919841 100644 --- a/doc/draught/board/struct.Direction.html +++ b/doc/draught/board/struct.Direction.html @@ -1,41 +1,42 @@ -Direction in draught::board - Rust -
pub struct Direction<T: Clone + Copy> {
+    nw: Option<T>,
+    ne: Option<T>,
+    se: Option<T>,
+    sw: Option<T>,
 }
Expand description

Standard diagonal movements given by north west/east etc

Used as an absolute measure, i.e. not relative to the team making a move

Use options for when movements are blocked/unallowed contextually

-

Fields

nw: Option<T>

North West

-
ne: Option<T>

North East

-
se: Option<T>

South East

-
sw: Option<T>

South West

-

Implementations

Create an empty direction full of Option::None

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Fields

nw: Option<T>

North West

+
ne: Option<T>

North East

+
se: Option<T>

South East

+
sw: Option<T>

South West

+

Implementations

Create an empty direction full of Option::None

+

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+From<T> for U chooses to do.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.Piece.html b/doc/draught/board/struct.Piece.html index 1591964..0718cb7 100644 --- a/doc/draught/board/struct.Piece.html +++ b/doc/draught/board/struct.Piece.html @@ -1,57 +1,58 @@ -Piece in draught::board - Rust -
pub struct Piece {
     pub team: Team,
     pub strength: Strength,
 }
Expand description

Game piece given by its team and strength (normal or kinged)

-

Fields

team: Teamstrength: Strength

Implementations

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

The wasm ABI type that this converts from when coming back out from the +

Fields

team: Teamstrength: Strength

Implementations

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

The wasm ABI type references to Self are recovered from.

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

-

Same as RefFromWasmAbi::Abi

+

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.Square.html b/doc/draught/board/struct.Square.html index 4cd6464..a5561ef 100644 --- a/doc/draught/board/struct.Square.html +++ b/doc/draught/board/struct.Square.html @@ -1,63 +1,64 @@ -Square in draught::board - Rust -
pub struct Square {
-    pub occupant: Option<Piece>,
+    pub occupant: Option<Piece>,
     pub state: SquareState,
 }
Expand description

Board squares given by a state and a possible occupying game piece

-

Fields

occupant: Option<Piece>

Game piece if square is occupied

+

Fields

occupant: Option<Piece>

Game piece if square is occupied

state: SquareState

Description of whether the square is occupied or an unplayable, i.e. off-lattice square

-

Implementations

Standard constructor function to form square from state and occupant

+

Implementations

Standard constructor function to form square from state and occupant

Helper function for a well-formed piece square by team and strength

Helper function for a well-formed empty square

Helper function for a well-formed unplayable square

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

The wasm ABI type that this converts from when coming back out from the +

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

The wasm ABI type references to Self are recovered from.

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

-

Same as RefFromWasmAbi::Abi

+

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/comp/index.html b/doc/draught/comp/index.html index 1370798..f8f22cb 100644 --- a/doc/draught/comp/index.html +++ b/doc/draught/comp/index.html @@ -1,13 +1,14 @@ -draught::comp - Rust -
Expand description

AI player logic

Structs

For storing boards in the AI tree, stores board with score for comparisons

Root-level structure for managing the game as a collection of board states

Represents a move by source/destination indices and the move type

-
+
\ No newline at end of file diff --git a/doc/draught/comp/sidebar-items.js b/doc/draught/comp/sidebar-items.js index 71168d6..304efc7 100644 --- a/doc/draught/comp/sidebar-items.js +++ b/doc/draught/comp/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"struct":[["BoardNode","For storing boards in the AI tree, stores board with score for comparisons"],["Computer","Root-level structure for managing the game as a collection of board states"],["Move","Represents a move by source/destination indices and the move type"]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"struct":[["BoardNode","For storing boards in the AI tree, stores board with score for comparisons"],["Computer","Root-level structure for managing the game as a collection of board states"],["Move","Represents a move by source/destination indices and the move type"]]}; \ No newline at end of file diff --git a/doc/draught/comp/struct.BoardNode.html b/doc/draught/comp/struct.BoardNode.html index 718b5b0..ff3ab62 100644 --- a/doc/draught/comp/struct.BoardNode.html +++ b/doc/draught/comp/struct.BoardNode.html @@ -1,32 +1,33 @@ -BoardNode in draught::comp - Rust -
pub struct BoardNode {
     pub board: Board,
-    pub score: isize,
+    pub score: isize,
 }
Expand description

For storing boards in the AI tree, stores board with score for comparisons

-

Fields

board: Boardscore: isize

Implementations

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Fields

board: Boardscore: isize

Implementations

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+From<T> for U chooses to do.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/comp/struct.Computer.html b/doc/draught/comp/struct.Computer.html index 3de0357..897aedd 100644 --- a/doc/draught/comp/struct.Computer.html +++ b/doc/draught/comp/struct.Computer.html @@ -1,39 +1,40 @@ -Computer in draught::comp - Rust -
pub struct Computer {
-    pub search_depth: usize,
+    pub search_depth: usize,
     pub team: Team,
-    pub last_node_count: usize,
-    pub perfect_chance: f64,
+    pub last_node_count: usize,
+    pub perfect_chance: f64,
 }
Expand description

Root-level structure for managing the game as a collection of board states

-

Fields

search_depth: usizeteam: Teamlast_node_count: usizeperfect_chance: f64

Implementations

Get vector of available moves for a given board

+

Fields

search_depth: usizeteam: Teamlast_node_count: usizeperfect_chance: f64

Implementations

Get vector of available moves for a given board

Generate tree of boards to given search depth, return root node

Propagate scores up the tree employing MiniMax algorithm

-

Get best of given scores for given team

-

For given NodeIDs, insert score of board into tree +

Get best of given scores for given team

+

For given NodeIDs, insert score of board into tree Used for leaf nodes ready for propagating up tree

-

Traverse tree from given root ID and get NodeIDs of leaf nodes (those without children)

-

Expand all given nodes and return newly inserted layer of nodes

-

Insert all possible next boards as children of given board node

-

Insert given boards into tree

-

Get all possible next boards from given board

-

Get a new board based on the given using MiniMax to make decisions

-

Get a random board from possible node IDs and associated tree

-

Trait Implementations

Formats the value using the given formatter. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Traverse tree from given root ID and get NodeIDs of leaf nodes (those without children)

+

Expand all given nodes and return newly inserted layer of nodes

+

Insert all possible next boards as children of given board node

+

Insert given boards into tree

+

Get all possible next boards from given board

+

Get a new board based on the given using MiniMax to make decisions

+

Get a random board from possible node IDs and associated tree

+

Trait Implementations

Formats the value using the given formatter. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+From<T> for U chooses to do.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/comp/struct.Move.html b/doc/draught/comp/struct.Move.html index 9b74860..0364fa4 100644 --- a/doc/draught/comp/struct.Move.html +++ b/doc/draught/comp/struct.Move.html @@ -1,33 +1,34 @@ -Move in draught::comp - Rust -
pub struct Move {
     from: BrdIdx,
     to: BrdIdx,
     mv_type: MoveType,
 }
Expand description

Represents a move by source/destination indices and the move type

-

Fields

from: BrdIdxto: BrdIdxmv_type: MoveType

Implementations

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Fields

from: BrdIdxto: BrdIdxmv_type: MoveType

Implementations

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+From<T> for U chooses to do.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/constant.__wasm_bindgen_generated_init_wasm__const.html b/doc/draught/constant.__wasm_bindgen_generated_init_wasm__const.html index 683f483..cbae9ad 100644 --- a/doc/draught/constant.__wasm_bindgen_generated_init_wasm__const.html +++ b/doc/draught/constant.__wasm_bindgen_generated_init_wasm__const.html @@ -1,8 +1,9 @@ -__wasm_bindgen_generated_init_wasm__const in draught - Rust -
pub(crate) const __wasm_bindgen_generated_init_wasm__const: ();
\ No newline at end of file diff --git a/doc/draught/fn.init_wasm.html b/doc/draught/fn.init_wasm.html index fbb19ae..ebe9acc 100644 --- a/doc/draught/fn.init_wasm.html +++ b/doc/draught/fn.init_wasm.html @@ -1,8 +1,9 @@ -init_wasm in draught - Rust -
+

Function draught::init_wasm

source · []
pub fn init_wasm()
\ No newline at end of file diff --git a/doc/draught/game/constant.__wbg_get_game_last_node_count__const.html b/doc/draught/game/constant.__wbg_get_game_last_node_count__const.html index 39fc5ee..acf1e20 100644 --- a/doc/draught/game/constant.__wbg_get_game_last_node_count__const.html +++ b/doc/draught/game/constant.__wbg_get_game_last_node_count__const.html @@ -1,8 +1,9 @@ -__wbg_get_game_last_node_count__const in draught::game - Rust -
const __wbg_get_game_last_node_count__const: ();
\ No newline at end of file diff --git a/doc/draught/game/constant.__wbg_get_game_perfect_chance__const.html b/doc/draught/game/constant.__wbg_get_game_perfect_chance__const.html index ec59c34..a70e575 100644 --- a/doc/draught/game/constant.__wbg_get_game_perfect_chance__const.html +++ b/doc/draught/game/constant.__wbg_get_game_perfect_chance__const.html @@ -1,8 +1,9 @@ -__wbg_get_game_perfect_chance__const in draught::game - Rust -
const __wbg_get_game_perfect_chance__const: ();
\ No newline at end of file diff --git a/doc/draught/game/index.html b/doc/draught/game/index.html index 61d3dc6..b27b25a 100644 --- a/doc/draught/game/index.html +++ b/doc/draught/game/index.html @@ -1,12 +1,13 @@ -draught::game - Rust -
Expand description

Top-level object for managing Boards, applying and managing turns

Structs

Root-level structure for managing the game as a collection of board states

Constants

-
+
\ No newline at end of file diff --git a/doc/draught/game/sidebar-items.js b/doc/draught/game/sidebar-items.js index 2a082b4..8d0802c 100644 --- a/doc/draught/game/sidebar-items.js +++ b/doc/draught/game/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"constant":[["__wbg_get_game_last_node_count__const",""],["__wbg_get_game_perfect_chance__const",""]],"struct":[["Game","Root-level structure for managing the game as a collection of board states"]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":[["__wbg_get_game_last_node_count__const",""],["__wbg_get_game_perfect_chance__const",""]],"struct":[["Game","Root-level structure for managing the game as a collection of board states"]]}; \ No newline at end of file diff --git a/doc/draught/game/struct.Game.html b/doc/draught/game/struct.Game.html index 8e2df50..7d18185 100644 --- a/doc/draught/game/struct.Game.html +++ b/doc/draught/game/struct.Game.html @@ -1,80 +1,81 @@ -Game in draught::game - Rust -
pub struct Game {
     current: Board,
-    selected_piece: Option<BrdIdx>,
-    previous_boards: Vec<Board>,
-    painter: Option<Painter>,
-    search_depth: usize,
-    pub last_node_count: usize,
-    pub perfect_chance: f64,
+    selected_piece: Option<BrdIdx>,
+    previous_boards: Vec<Board>,
+    painter: Option<Painter>,
+    search_depth: usize,
+    pub last_node_count: usize,
+    pub perfect_chance: f64,
 }
Expand description

Root-level structure for managing the game as a collection of board states

-

Fields

current: Boardselected_piece: Option<BrdIdx>previous_boards: Vec<Board>painter: Option<Painter>search_depth: usizelast_node_count: usizeperfect_chance: f64

Implementations

Get a read-only copy of a previous turn’s board

+

Fields

current: Boardselected_piece: Option<BrdIdx>previous_boards: Vec<Board>painter: Option<Painter>search_depth: usizelast_node_count: usizeperfect_chance: f64

Implementations

Get a read-only copy of a previous turn’s board

Set current board to given

-

Get pointer to current board’s squares

-

Get pointer to current board’s squares

+

Get pointer to current board’s squares

+

Get pointer to current board’s squares

Current turn’s team

-

Current board’s score

-

Get currently winning player

-

Check if a player has won

+

Current board’s score

+

Get currently winning player

+

Check if a player has won

Get square on current board for given index

-

Set tree depth for AI to search to

+

Set tree depth for AI to search to

Set given index as selected piece TODO: Check whether valid square?

-

Set proportion of perfect moves from AI

+

Set proportion of perfect moves from AI

Clear currently selected piece

Attempt to make a move given a source and destination index

Update board state with given move and push new board into current state

Update board state with given jump move and push new board into current state

Push current board into the previous turns and set given board to current

Set current board to given

-

Get new game without board renderer

-

Get a new game with canvas ID and dimensions

+

Get new game without board renderer

+

Get a new game with canvas ID and dimensions

Set painter for rendering boards

Draw current board using painter if exists

Create computer, get move from current board and update current board

-

Trait Implementations

Formats the value using the given formatter. Read more

-

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

The wasm ABI type that this converts from when coming back out from the +

Trait Implementations

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

The wasm ABI type references to Self are recovered from.

+

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

-

Same as RefFromWasmAbi::Abi

+

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

Converts the given value to a String. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/index.html b/doc/draught/index.html index 1618772..03eb4f5 100644 --- a/doc/draught/index.html +++ b/doc/draught/index.html @@ -1,10 +1,11 @@ -draught - Rust -
+

Crate draught

source · []
Expand description

Draught

An implementation of checkers/draughts in Rust WebAssembly with a minimax AI player

Re-exports

pub use board::Board;
pub use game::Game;
pub use comp::Computer;
pub use paint::Painter;

Modules

@@ -16,5 +17,5 @@

Wrap the web_sys access to the browser console in a macro for easy logging

Constants

Functions

-
+
\ No newline at end of file diff --git a/doc/draught/macro.log.html b/doc/draught/macro.log.html index 3aeba0d..1076bac 100644 --- a/doc/draught/macro.log.html +++ b/doc/draught/macro.log.html @@ -1,12 +1,13 @@ -log in draught - Rust -
+

Macro draught::log

source · []
macro_rules! log {
     ( $( $t:tt )* ) => { ... };
 }
Expand description

Wrap the web_sys access to the browser console in a macro for easy logging

-
+
\ No newline at end of file diff --git a/doc/draught/macro.log_error.html b/doc/draught/macro.log_error.html index a3d3a18..4da1e7d 100644 --- a/doc/draught/macro.log_error.html +++ b/doc/draught/macro.log_error.html @@ -1,11 +1,12 @@ -log_error in draught - Rust -
macro_rules! log_error {
     ( $( $t:tt )* ) => { ... };
 }
-
+
\ No newline at end of file diff --git a/doc/draught/paint/constant.BLACK_PIECE.html b/doc/draught/paint/constant.BLACK_PIECE.html index 1260d50..5cbb32c 100644 --- a/doc/draught/paint/constant.BLACK_PIECE.html +++ b/doc/draught/paint/constant.BLACK_PIECE.html @@ -1,9 +1,10 @@ -BLACK_PIECE in draught::paint - Rust -
const BLACK_PIECE: &str = "#ed0000";
Expand description

Default hex colour value for black pieces

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.BLACK_PIECE_OUTLINE.html b/doc/draught/paint/constant.BLACK_PIECE_OUTLINE.html index 030ad74..b12e801 100644 --- a/doc/draught/paint/constant.BLACK_PIECE_OUTLINE.html +++ b/doc/draught/paint/constant.BLACK_PIECE_OUTLINE.html @@ -1,9 +1,10 @@ -BLACK_PIECE_OUTLINE in draught::paint - Rust -
const BLACK_PIECE_OUTLINE: &str = "#a60000";
Expand description

Default hex colour value for black piece outline

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.BLACK_SQUARE.html b/doc/draught/paint/constant.BLACK_SQUARE.html index 6e9d479..43daecb 100644 --- a/doc/draught/paint/constant.BLACK_SQUARE.html +++ b/doc/draught/paint/constant.BLACK_SQUARE.html @@ -1,9 +1,10 @@ -BLACK_SQUARE in draught::paint - Rust -
const BLACK_SQUARE: &str = "#000000";
Expand description

Default hex colour value for black square background

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.DRAW_OUTLINE.html b/doc/draught/paint/constant.DRAW_OUTLINE.html index c83c52f..e0cf3cc 100644 --- a/doc/draught/paint/constant.DRAW_OUTLINE.html +++ b/doc/draught/paint/constant.DRAW_OUTLINE.html @@ -1,9 +1,10 @@ -DRAW_OUTLINE in draught::paint - Rust -
const DRAW_OUTLINE: bool = true;
Expand description

Whether to outline black squares

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.DRAW_PIECE_OUTLINES.html b/doc/draught/paint/constant.DRAW_PIECE_OUTLINES.html index c4adc98..6daba47 100644 --- a/doc/draught/paint/constant.DRAW_PIECE_OUTLINES.html +++ b/doc/draught/paint/constant.DRAW_PIECE_OUTLINES.html @@ -1,9 +1,10 @@ -DRAW_PIECE_OUTLINES in draught::paint - Rust -
const DRAW_PIECE_OUTLINES: bool = true;
Expand description

Whether to outline pieces

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.KING_OUTLINE.html b/doc/draught/paint/constant.KING_OUTLINE.html index e9d2a5d..d2bdcd8 100644 --- a/doc/draught/paint/constant.KING_OUTLINE.html +++ b/doc/draught/paint/constant.KING_OUTLINE.html @@ -1,9 +1,10 @@ -KING_OUTLINE in draught::paint - Rust -
const KING_OUTLINE: &str = "#ffea00";
Expand description

Default hex colour value for black piece outline

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.OUTLINE_WIDTH.html b/doc/draught/paint/constant.OUTLINE_WIDTH.html index 6e9a905..98e25a8 100644 --- a/doc/draught/paint/constant.OUTLINE_WIDTH.html +++ b/doc/draught/paint/constant.OUTLINE_WIDTH.html @@ -1,9 +1,10 @@ -OUTLINE_WIDTH in draught::paint - Rust -
const OUTLINE_WIDTH: f64 = 0.05;
Expand description

Line width when outlining black squares as proportion of min cell dimension

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.PIECE_OUTLINE_PROPORTION.html b/doc/draught/paint/constant.PIECE_OUTLINE_PROPORTION.html index 44f32f9..cb056d3 100644 --- a/doc/draught/paint/constant.PIECE_OUTLINE_PROPORTION.html +++ b/doc/draught/paint/constant.PIECE_OUTLINE_PROPORTION.html @@ -1,9 +1,10 @@ -PIECE_OUTLINE_PROPORTION in draught::paint - Rust -
const PIECE_OUTLINE_PROPORTION: f64 = 0.25;
Expand description

Line width for outlining pieces as proportion of piece radius

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.PIECE_PROPORTION.html b/doc/draught/paint/constant.PIECE_PROPORTION.html index 01ace90..8158265 100644 --- a/doc/draught/paint/constant.PIECE_PROPORTION.html +++ b/doc/draught/paint/constant.PIECE_PROPORTION.html @@ -1,9 +1,10 @@ -PIECE_PROPORTION in draught::paint - Rust -
const PIECE_PROPORTION: f64 = 0.6;
Expand description

Proportion of square that piece fills as proportion of min cell dimension

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.SELECTED_PIECE.html b/doc/draught/paint/constant.SELECTED_PIECE.html index ef0f55a..894f31f 100644 --- a/doc/draught/paint/constant.SELECTED_PIECE.html +++ b/doc/draught/paint/constant.SELECTED_PIECE.html @@ -1,9 +1,10 @@ -SELECTED_PIECE in draught::paint - Rust -
const SELECTED_PIECE: &str = "#fffd78";
Expand description

Default hex colour value for selected piece

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.SELECTED_PIECE_OUTLINE.html b/doc/draught/paint/constant.SELECTED_PIECE_OUTLINE.html index bde97f9..9cba5f7 100644 --- a/doc/draught/paint/constant.SELECTED_PIECE_OUTLINE.html +++ b/doc/draught/paint/constant.SELECTED_PIECE_OUTLINE.html @@ -1,9 +1,10 @@ -SELECTED_PIECE_OUTLINE in draught::paint - Rust -
const SELECTED_PIECE_OUTLINE: &str = "#d1cf45";
Expand description

Default hex colour value for selected piece outline

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.SQUARE_OUTLINE.html b/doc/draught/paint/constant.SQUARE_OUTLINE.html index 5621476..4952192 100644 --- a/doc/draught/paint/constant.SQUARE_OUTLINE.html +++ b/doc/draught/paint/constant.SQUARE_OUTLINE.html @@ -1,9 +1,10 @@ -SQUARE_OUTLINE in draught::paint - Rust -
const SQUARE_OUTLINE: &str = "#9c9c9c";
Expand description

Default hex colour value for outline of black squares

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.WHITE_PIECE.html b/doc/draught/paint/constant.WHITE_PIECE.html index b63c005..154c721 100644 --- a/doc/draught/paint/constant.WHITE_PIECE.html +++ b/doc/draught/paint/constant.WHITE_PIECE.html @@ -1,9 +1,10 @@ -WHITE_PIECE in draught::paint - Rust -
const WHITE_PIECE: &str = "#dbdbdb";
Expand description

Default hex colour value for white pieces

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.WHITE_PIECE_OUTLINE.html b/doc/draught/paint/constant.WHITE_PIECE_OUTLINE.html index ea1e5ba..a204763 100644 --- a/doc/draught/paint/constant.WHITE_PIECE_OUTLINE.html +++ b/doc/draught/paint/constant.WHITE_PIECE_OUTLINE.html @@ -1,9 +1,10 @@ -WHITE_PIECE_OUTLINE in draught::paint - Rust -
const WHITE_PIECE_OUTLINE: &str = "#9c9c9c";
Expand description

Default hex colour value for white piece outline

+
\ No newline at end of file diff --git a/doc/draught/paint/constant.WHITE_SQUARE.html b/doc/draught/paint/constant.WHITE_SQUARE.html index cbc715f..bbf723b 100644 --- a/doc/draught/paint/constant.WHITE_SQUARE.html +++ b/doc/draught/paint/constant.WHITE_SQUARE.html @@ -1,9 +1,10 @@ -WHITE_SQUARE in draught::paint - Rust -
const WHITE_SQUARE: &str = "#FFFFFF";
Expand description

Default hex colour value for white square background

+
\ No newline at end of file diff --git a/doc/draught/paint/index.html b/doc/draught/paint/index.html index c6df4c7..222bff7 100644 --- a/doc/draught/paint/index.html +++ b/doc/draught/paint/index.html @@ -1,9 +1,10 @@ -draught::paint - Rust -
Expand description

Components for painting board states onto HTML canvases

Structs

Used to paint boards onto HTML canvases

@@ -23,5 +24,5 @@

Default hex colour value for white pieces

Default hex colour value for white piece outline

Default hex colour value for white square background

-
+
\ No newline at end of file diff --git a/doc/draught/paint/sidebar-items.js b/doc/draught/paint/sidebar-items.js index dc59e1f..bc3480f 100644 --- a/doc/draught/paint/sidebar-items.js +++ b/doc/draught/paint/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"constant":[["BLACK_PIECE","Default hex colour value for black pieces"],["BLACK_PIECE_OUTLINE","Default hex colour value for black piece outline"],["BLACK_SQUARE","Default hex colour value for black square background"],["DRAW_OUTLINE","Whether to outline black squares"],["DRAW_PIECE_OUTLINES","Whether to outline pieces"],["KING_OUTLINE","Default hex colour value for black piece outline"],["OUTLINE_WIDTH","Line width when outlining black squares as proportion of min cell dimension"],["PIECE_OUTLINE_PROPORTION","Line width for outlining pieces as proportion of piece radius"],["PIECE_PROPORTION","Proportion of square that piece fills as proportion of min cell dimension"],["SELECTED_PIECE","Default hex colour value for selected piece"],["SELECTED_PIECE_OUTLINE","Default hex colour value for selected piece outline"],["SQUARE_OUTLINE","Default hex colour value for outline of black squares"],["WHITE_PIECE","Default hex colour value for white pieces"],["WHITE_PIECE_OUTLINE","Default hex colour value for white piece outline"],["WHITE_SQUARE","Default hex colour value for white square background"]],"struct":[["Painter","Used to paint boards onto HTML canvases"]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":[["BLACK_PIECE","Default hex colour value for black pieces"],["BLACK_PIECE_OUTLINE","Default hex colour value for black piece outline"],["BLACK_SQUARE","Default hex colour value for black square background"],["DRAW_OUTLINE","Whether to outline black squares"],["DRAW_PIECE_OUTLINES","Whether to outline pieces"],["KING_OUTLINE","Default hex colour value for black piece outline"],["OUTLINE_WIDTH","Line width when outlining black squares as proportion of min cell dimension"],["PIECE_OUTLINE_PROPORTION","Line width for outlining pieces as proportion of piece radius"],["PIECE_PROPORTION","Proportion of square that piece fills as proportion of min cell dimension"],["SELECTED_PIECE","Default hex colour value for selected piece"],["SELECTED_PIECE_OUTLINE","Default hex colour value for selected piece outline"],["SQUARE_OUTLINE","Default hex colour value for outline of black squares"],["WHITE_PIECE","Default hex colour value for white pieces"],["WHITE_PIECE_OUTLINE","Default hex colour value for white piece outline"],["WHITE_SQUARE","Default hex colour value for white square background"]],"struct":[["Painter","Used to paint boards onto HTML canvases"]]}; \ No newline at end of file diff --git a/doc/draught/paint/struct.Painter.html b/doc/draught/paint/struct.Painter.html index 81e38ff..104fce4 100644 --- a/doc/draught/paint/struct.Painter.html +++ b/doc/draught/paint/struct.Painter.html @@ -1,13 +1,14 @@ -Painter in draught::paint - Rust -
pub struct Painter {
Show 19 fields canvas: HtmlCanvasElement, context: CanvasRenderingContext2d, - selected_idx: Option<BrdIdx>, + selected_idx: Option<BrdIdx>, white_square: JsValue, black_square: JsValue, white_piece: JsValue, @@ -17,61 +18,61 @@ black_piece_line: JsValue, selected_piece_line: JsValue, king_line: JsValue, - piece_lines: bool, - piece_line_proportion: f64, + piece_lines: bool, + piece_line_proportion: f64, square_outline: JsValue, - outline_width: f64, - draw_outline: bool, - width: u32, - height: u32, + outline_width: f64, + draw_outline: bool, + width: u32, + height: u32,
}
Expand description

Used to paint boards onto HTML canvases

-

Fields

canvas: HtmlCanvasElementcontext: CanvasRenderingContext2dselected_idx: Option<BrdIdx>white_square: JsValueblack_square: JsValuewhite_piece: JsValueblack_piece: JsValueselected_piece: JsValuewhite_piece_line: JsValueblack_piece_line: JsValueselected_piece_line: JsValueking_line: JsValuepiece_lines: boolpiece_line_proportion: f64square_outline: JsValueoutline_width: f64draw_outline: boolwidth: u32height: u32

Implementations

Set selected piece by board index

-

Get a canvas by element ID

+

Fields

canvas: HtmlCanvasElementcontext: CanvasRenderingContext2dselected_idx: Option<BrdIdx>white_square: JsValueblack_square: JsValuewhite_piece: JsValueblack_piece: JsValueselected_piece: JsValuewhite_piece_line: JsValueblack_piece_line: JsValueselected_piece_line: JsValueking_line: JsValuepiece_lines: boolpiece_line_proportion: f64square_outline: JsValueoutline_width: f64draw_outline: boolwidth: u32height: u32

Implementations

Set selected piece by board index

+

Get a canvas by element ID

Get a 2D canvas context for a given canvas

-

Default constructor which queries for canvas by ID

-

Constructor with given canvas element

+

Default constructor which queries for canvas by ID

+

Constructor with given canvas element

Set new square outline colour value

-

Set new line width for outlining squares

-

Set whether squares are outlined

+

Set new line width for outlining squares

+

Set whether squares are outlined

Reset the canvas dimensions to the given width and height

-

Check whether given canvas dimensions divide evenly by given board dimenions

+

Check whether given canvas dimensions divide evenly by given board dimenions

Draw a board onto the canvas

-

Trait Implementations

Formats the value using the given formatter. Read more

-

Converts to this type from the input type.

-

The wasm ABI type that this converts from when coming back out from the +

Trait Implementations

Formats the value using the given formatter. Read more

+

Converts to this type from the input type.

+

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

-

Recover a Self from Self::Abi. Read more

-

The wasm ABI type that this converts into when crossing the ABI +

Recover a Self from Self::Abi. Read more

+

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

-

Convert self into Self::Abi so that it can be sent across the wasm +

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

-

Tests whether the argument is a “none” instance. If so it will be +

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

-

The wasm ABI type references to Self are recovered from.

+

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

-

Same as RefFromWasmAbi::Abi

+

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Returns the argument unchanged.

+

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +From<T> for U chooses to do.

+

Same as IntoWasmAbi::Abi

+

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
\ No newline at end of file diff --git a/doc/draught/sidebar-items.js b/doc/draught/sidebar-items.js index 2a4c9f0..21cf1e0 100644 --- a/doc/draught/sidebar-items.js +++ b/doc/draught/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"constant":[["__wasm_bindgen_generated_init_wasm__const",""]],"fn":[["init_wasm",""]],"macro":[["log","Wrap the [`web_sys`] access to the browser console in a macro for easy logging"],["log_error",""]],"mod":[["board","Board module for components related to the checkers board and game structure"],["comp","AI player logic"],["game","Top-level object for managing [`Board`]s, applying and managing turns"],["paint","Components for painting board states onto HTML canvases"],["utils",""]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":[["__wasm_bindgen_generated_init_wasm__const",""]],"fn":[["init_wasm",""]],"macro":[["log","Wrap the [`web_sys`] access to the browser console in a macro for easy logging"],["log_error",""]],"mod":[["board","Board module for components related to the checkers board and game structure"],["comp","AI player logic"],["game","Top-level object for managing [`Board`]s, applying and managing turns"],["paint","Components for painting board states onto HTML canvases"],["utils",""]]}; \ No newline at end of file diff --git a/doc/draught/utils/fn.set_panic_hook.html b/doc/draught/utils/fn.set_panic_hook.html index 4a8adf0..d427c44 100644 --- a/doc/draught/utils/fn.set_panic_hook.html +++ b/doc/draught/utils/fn.set_panic_hook.html @@ -1,8 +1,9 @@ -set_panic_hook in draught::utils - Rust -
pub fn set_panic_hook()
\ No newline at end of file diff --git a/doc/draught/utils/index.html b/doc/draught/utils/index.html index 9d685fa..2a5ed96 100644 --- a/doc/draught/utils/index.html +++ b/doc/draught/utils/index.html @@ -1,9 +1,10 @@ -draught::utils - Rust -
+
\ No newline at end of file diff --git a/doc/draught/utils/sidebar-items.js b/doc/draught/utils/sidebar-items.js index 8b40b8f..8c9958f 100644 --- a/doc/draught/utils/sidebar-items.js +++ b/doc/draught/utils/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"fn":[["set_panic_hook",""]]}); \ No newline at end of file +window.SIDEBAR_ITEMS = {"fn":[["set_panic_hook",""]]}; \ No newline at end of file diff --git a/doc/implementors/core/clone/trait.Clone.js b/doc/implementors/core/clone/trait.Clone.js index 9679e4a..34ed7ad 100644 --- a/doc/implementors/core/clone/trait.Clone.js +++ b/doc/implementors/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Clone for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Clone for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Clone for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Clone for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Clone for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Clone for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Clone + Copy> Clone for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Clone for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Clone for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Clone for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Clone for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl Clone for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; +implementors["draught"] = [{"text":"impl Clone for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Clone for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Clone for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Clone for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Clone for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Clone for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Clone + Copy> Clone for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Clone for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Clone for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Clone for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Clone for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl Clone for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/cmp/trait.Eq.js b/doc/implementors/core/cmp/trait.Eq.js index 1fddf81..a4e3080 100644 --- a/doc/implementors/core/cmp/trait.Eq.js +++ b/doc/implementors/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Eq for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Eq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Eq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Eq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Eq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Eq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Eq + Clone + Copy> Eq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Eq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Eq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Eq for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Eq for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl Eq for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; +implementors["draught"] = [{"text":"impl Eq for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Eq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Eq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Eq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Eq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Eq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Eq + Clone + Copy> Eq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Eq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Eq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Eq for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Eq for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl Eq for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/cmp/trait.PartialEq.js b/doc/implementors/core/cmp/trait.PartialEq.js index 1cd0773..86e4b65 100644 --- a/doc/implementors/core/cmp/trait.PartialEq.js +++ b/doc/implementors/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl PartialEq<MoveType> for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl PartialEq<Team> for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl PartialEq<Strength> for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl PartialEq<SquareState> for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl PartialEq<Moveable> for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl PartialEq<Piece> for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: PartialEq + Clone + Copy> PartialEq<Direction<T>> for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl PartialEq<Square> for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl PartialEq<BrdIdx> for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl PartialEq<Board> for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl PartialEq<Move> for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl PartialEq<BoardNode> for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; +implementors["draught"] = [{"text":"impl PartialEq<MoveType> for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl PartialEq<Team> for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl PartialEq<Strength> for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl PartialEq<SquareState> for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl PartialEq<Moveable> for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl PartialEq<Piece> for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: PartialEq + Clone + Copy> PartialEq<Direction<T>> for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl PartialEq<Square> for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl PartialEq<BrdIdx> for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl PartialEq<Board> for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl PartialEq<Move> for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl PartialEq<BoardNode> for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/convert/trait.From.js b/doc/implementors/core/convert/trait.From.js index f792140..448b91c 100644 --- a/doc/implementors/core/convert/trait.From.js +++ b/doc/implementors/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl From<Piece> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Square> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<BrdIdx> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Board> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Game> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Painter> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]}]; +implementors["draught"] = [{"text":"impl From<Piece> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Square> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<BrdIdx> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Board> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Game> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]},{"text":"impl From<Painter> for JsValue","synthetic":false,"types":["wasm_bindgen::JsValue"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/fmt/trait.Debug.js b/doc/implementors/core/fmt/trait.Debug.js index 5490f76..5828b76 100644 --- a/doc/implementors/core/fmt/trait.Debug.js +++ b/doc/implementors/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Debug for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Debug for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Debug for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Debug for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Debug for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Debug for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Debug + Clone + Copy> Debug for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Debug for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Debug for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Debug for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Debug for Game","synthetic":false,"types":["draught::game::Game"]},{"text":"impl Debug for Painter","synthetic":false,"types":["draught::paint::Painter"]},{"text":"impl Debug for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl Debug for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]},{"text":"impl Debug for Computer","synthetic":false,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl Debug for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Debug for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Debug for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Debug for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Debug for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Debug for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Debug + Clone + Copy> Debug for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Debug for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Debug for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Debug for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Debug for Game","synthetic":false,"types":["draught::game::Game"]},{"text":"impl Debug for Painter","synthetic":false,"types":["draught::paint::Painter"]},{"text":"impl Debug for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl Debug for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]},{"text":"impl Debug for Computer","synthetic":false,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/fmt/trait.Display.js b/doc/implementors/core/fmt/trait.Display.js index 31ed9b2..c0d7cc0 100644 --- a/doc/implementors/core/fmt/trait.Display.js +++ b/doc/implementors/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Display for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Display for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Display for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Display for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Display for Game","synthetic":false,"types":["draught::game::Game"]}]; +implementors["draught"] = [{"text":"impl Display for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Display for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Display for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Display for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl Display for Game","synthetic":false,"types":["draught::game::Game"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/iter/traits/iterator/trait.Iterator.js b/doc/implementors/core/iter/traits/iterator/trait.Iterator.js index b4f7e7e..1585142 100644 --- a/doc/implementors/core/iter/traits/iterator/trait.Iterator.js +++ b/doc/implementors/core/iter/traits/iterator/trait.Iterator.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl<'a> Iterator for RowIndexIterator<'a>","synthetic":false,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Iterator for RowSquareIterator<'a>","synthetic":false,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Iterator for PieceIterator<'a>","synthetic":false,"types":["draught::board::iter::PieceIterator"]}]; +implementors["draught"] = [{"text":"impl<'a> Iterator for RowIndexIterator<'a>","synthetic":false,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Iterator for RowSquareIterator<'a>","synthetic":false,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Iterator for PieceIterator<'a>","synthetic":false,"types":["draught::board::iter::PieceIterator"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Copy.js b/doc/implementors/core/marker/trait.Copy.js index 3b6d06c..bfb4fa8 100644 --- a/doc/implementors/core/marker/trait.Copy.js +++ b/doc/implementors/core/marker/trait.Copy.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Copy for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Copy for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Copy for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Copy for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Copy for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Copy for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Copy + Clone + Copy> Copy for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Copy for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Copy for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Copy for Move","synthetic":false,"types":["draught::comp::Move"]}]; +implementors["draught"] = [{"text":"impl Copy for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl Copy for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl Copy for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl Copy for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl Copy for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl Copy for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Copy + Clone + Copy> Copy for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl Copy for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl Copy for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl Copy for Move","synthetic":false,"types":["draught::comp::Move"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Freeze.js b/doc/implementors/core/marker/trait.Freeze.js index 5e07b75..4ad47fa 100644 --- a/doc/implementors/core/marker/trait.Freeze.js +++ b/doc/implementors/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Freeze for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Freeze for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Freeze for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Freeze for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Freeze for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Freeze for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Freeze for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Freeze for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Freeze for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Freeze for Direction<T> where
    T: Freeze
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Freeze for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Freeze for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Freeze for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Freeze for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl Freeze for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Freeze for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Freeze for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Freeze for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl Freeze for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Freeze for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Freeze for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Freeze for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Freeze for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Freeze for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Freeze for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Freeze for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Freeze for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Freeze for Direction<T> where
    T: Freeze
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Freeze for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Freeze for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Freeze for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Freeze for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl Freeze for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Freeze for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Freeze for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Freeze for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Send.js b/doc/implementors/core/marker/trait.Send.js index 6ab286d..2d2bf58 100644 --- a/doc/implementors/core/marker/trait.Send.js +++ b/doc/implementors/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Send for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Send for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Send for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Send for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Send for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Send for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Send for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Send for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Send for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Send for Direction<T> where
    T: Send
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Send for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Send for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Send for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl !Send for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl !Send for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Send for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Send for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Send for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl Send for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Send for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Send for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Send for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Send for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Send for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Send for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Send for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Send for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Send for Direction<T> where
    T: Send
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Send for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Send for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Send for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl !Send for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl !Send for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Send for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Send for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Send for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.StructuralEq.js b/doc/implementors/core/marker/trait.StructuralEq.js index 38f53fd..7428c27 100644 --- a/doc/implementors/core/marker/trait.StructuralEq.js +++ b/doc/implementors/core/marker/trait.StructuralEq.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl StructuralEq for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl StructuralEq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl StructuralEq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl StructuralEq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl StructuralEq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl StructuralEq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> StructuralEq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl StructuralEq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl StructuralEq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl StructuralEq for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl StructuralEq for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl StructuralEq for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; +implementors["draught"] = [{"text":"impl StructuralEq for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl StructuralEq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl StructuralEq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl StructuralEq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl StructuralEq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl StructuralEq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> StructuralEq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl StructuralEq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl StructuralEq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl StructuralEq for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl StructuralEq for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl StructuralEq for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.StructuralPartialEq.js b/doc/implementors/core/marker/trait.StructuralPartialEq.js index a529e9d..f050844 100644 --- a/doc/implementors/core/marker/trait.StructuralPartialEq.js +++ b/doc/implementors/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl StructuralPartialEq for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl StructuralPartialEq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl StructuralPartialEq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl StructuralPartialEq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl StructuralPartialEq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl StructuralPartialEq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> StructuralPartialEq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl StructuralPartialEq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl StructuralPartialEq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl StructuralPartialEq for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl StructuralPartialEq for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl StructuralPartialEq for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; +implementors["draught"] = [{"text":"impl StructuralPartialEq for MoveType","synthetic":false,"types":["draught::board::enums::MoveType"]},{"text":"impl StructuralPartialEq for Team","synthetic":false,"types":["draught::board::enums::Team"]},{"text":"impl StructuralPartialEq for Strength","synthetic":false,"types":["draught::board::enums::Strength"]},{"text":"impl StructuralPartialEq for SquareState","synthetic":false,"types":["draught::board::enums::SquareState"]},{"text":"impl StructuralPartialEq for Moveable","synthetic":false,"types":["draught::board::enums::Moveable"]},{"text":"impl StructuralPartialEq for Piece","synthetic":false,"types":["draught::board::Piece"]},{"text":"impl<T: Clone + Copy> StructuralPartialEq for Direction<T>","synthetic":false,"types":["draught::board::Direction"]},{"text":"impl StructuralPartialEq for Square","synthetic":false,"types":["draught::board::Square"]},{"text":"impl StructuralPartialEq for BrdIdx","synthetic":false,"types":["draught::board::BrdIdx"]},{"text":"impl StructuralPartialEq for Board","synthetic":false,"types":["draught::board::Board"]},{"text":"impl StructuralPartialEq for Move","synthetic":false,"types":["draught::comp::Move"]},{"text":"impl StructuralPartialEq for BoardNode","synthetic":false,"types":["draught::comp::BoardNode"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Sync.js b/doc/implementors/core/marker/trait.Sync.js index fefca00..58e91e6 100644 --- a/doc/implementors/core/marker/trait.Sync.js +++ b/doc/implementors/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Sync for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Sync for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Sync for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Sync for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Sync for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Sync for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Sync for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Sync for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Sync for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Sync for Direction<T> where
    T: Sync
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Sync for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Sync for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Sync for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl !Sync for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl !Sync for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Sync for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Sync for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Sync for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl Sync for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Sync for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Sync for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Sync for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Sync for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Sync for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Sync for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Sync for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Sync for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Sync for Direction<T> where
    T: Sync
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Sync for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Sync for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Sync for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl !Sync for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl !Sync for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Sync for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Sync for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Sync for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/marker/trait.Unpin.js b/doc/implementors/core/marker/trait.Unpin.js index 96031f4..04cfe9b 100644 --- a/doc/implementors/core/marker/trait.Unpin.js +++ b/doc/implementors/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl Unpin for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Unpin for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Unpin for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Unpin for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Unpin for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Unpin for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Unpin for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Unpin for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Unpin for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Unpin for Direction<T> where
    T: Unpin
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Unpin for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Unpin for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Unpin for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Unpin for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl Unpin for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Unpin for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Unpin for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Unpin for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl Unpin for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl Unpin for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl Unpin for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl Unpin for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl Unpin for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> Unpin for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> Unpin for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> Unpin for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl Unpin for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> Unpin for Direction<T> where
    T: Unpin
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl Unpin for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl Unpin for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl Unpin for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl Unpin for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl Unpin for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl Unpin for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl Unpin for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl Unpin for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js index 55c3734..d9281e3 100644 --- a/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/doc/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl RefUnwindSafe for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl RefUnwindSafe for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl RefUnwindSafe for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl RefUnwindSafe for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl RefUnwindSafe for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> RefUnwindSafe for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> RefUnwindSafe for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> RefUnwindSafe for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl RefUnwindSafe for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> RefUnwindSafe for Direction<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl RefUnwindSafe for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl RefUnwindSafe for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl RefUnwindSafe for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl RefUnwindSafe for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl RefUnwindSafe for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl RefUnwindSafe for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl RefUnwindSafe for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl RefUnwindSafe for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl RefUnwindSafe for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl RefUnwindSafe for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl RefUnwindSafe for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl RefUnwindSafe for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl RefUnwindSafe for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> RefUnwindSafe for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> RefUnwindSafe for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> RefUnwindSafe for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl RefUnwindSafe for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> RefUnwindSafe for Direction<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl RefUnwindSafe for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl RefUnwindSafe for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl RefUnwindSafe for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl RefUnwindSafe for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl RefUnwindSafe for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl RefUnwindSafe for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl RefUnwindSafe for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl RefUnwindSafe for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js index 55e776a..351fa5d 100644 --- a/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/doc/implementors/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["draught"] = [{"text":"impl UnwindSafe for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl UnwindSafe for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl UnwindSafe for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl UnwindSafe for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl UnwindSafe for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> UnwindSafe for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> UnwindSafe for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> UnwindSafe for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl UnwindSafe for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> UnwindSafe for Direction<T> where
    T: UnwindSafe
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl UnwindSafe for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl UnwindSafe for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl UnwindSafe for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl UnwindSafe for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl UnwindSafe for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl UnwindSafe for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl UnwindSafe for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl UnwindSafe for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; +implementors["draught"] = [{"text":"impl UnwindSafe for MoveType","synthetic":true,"types":["draught::board::enums::MoveType"]},{"text":"impl UnwindSafe for Team","synthetic":true,"types":["draught::board::enums::Team"]},{"text":"impl UnwindSafe for Strength","synthetic":true,"types":["draught::board::enums::Strength"]},{"text":"impl UnwindSafe for SquareState","synthetic":true,"types":["draught::board::enums::SquareState"]},{"text":"impl UnwindSafe for Moveable","synthetic":true,"types":["draught::board::enums::Moveable"]},{"text":"impl<'a> UnwindSafe for RowIndexIterator<'a>","synthetic":true,"types":["draught::board::iter::RowIndexIterator"]},{"text":"impl<'a> UnwindSafe for RowSquareIterator<'a>","synthetic":true,"types":["draught::board::iter::RowSquareIterator"]},{"text":"impl<'a> UnwindSafe for PieceIterator<'a>","synthetic":true,"types":["draught::board::iter::PieceIterator"]},{"text":"impl UnwindSafe for Piece","synthetic":true,"types":["draught::board::Piece"]},{"text":"impl<T> UnwindSafe for Direction<T> where
    T: UnwindSafe
","synthetic":true,"types":["draught::board::Direction"]},{"text":"impl UnwindSafe for Square","synthetic":true,"types":["draught::board::Square"]},{"text":"impl UnwindSafe for BrdIdx","synthetic":true,"types":["draught::board::BrdIdx"]},{"text":"impl UnwindSafe for Board","synthetic":true,"types":["draught::board::Board"]},{"text":"impl UnwindSafe for Game","synthetic":true,"types":["draught::game::Game"]},{"text":"impl UnwindSafe for Painter","synthetic":true,"types":["draught::paint::Painter"]},{"text":"impl UnwindSafe for Move","synthetic":true,"types":["draught::comp::Move"]},{"text":"impl UnwindSafe for BoardNode","synthetic":true,"types":["draught::comp::BoardNode"]},{"text":"impl UnwindSafe for Computer","synthetic":true,"types":["draught::comp::Computer"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/doc/light.css b/doc/light.css index 90de68d..ceb83fc 100644 --- a/doc/light.css +++ b/doc/light.css @@ -1 +1 @@ - body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#DDDDDD;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#F5F5F5;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.rust-logo{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current,.sidebar a:hover{background-color:#fff;}.source .sidebar{background-color:#f1f1f1;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#ddd;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}.sidebar a{color:#356da4;}.sidebar a.current.enum{color:#a63283;}.sidebar a.current.struct{color:#a63283;}.sidebar a.current.type{color:#a63283;}.sidebar a.current.associatedtype{color:#356da4;}.sidebar a.current.foreigntype{color:#356da4;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#067901;}.sidebar a.current.union{color:#a63283;}.sidebar a.current.constant .sidebar a.current.static{color:#356da4;}.sidebar a.current.primitive{color:#a63283;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#356da4;}.sidebar a.current.trait{color:#6849c3;}.sidebar a.current.traitalias{color:#4b349e;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#a67736;}.sidebar a.current.keyword{color:#356da4;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#000;}.search-results a{color:initial;}a.test-arrow{color:#f5f5f5;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search,.search-input{color:#555;background-color:white;border-color:#e0e0e0;}.search-input:focus{border-color:#66afe9;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgb(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F5F5F5;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F5F5F5;border-right-color:#000;}#sidebar-filler{background-color:#F5F5F5;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F5F5F5;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F5F5F5;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;}.scraped-example-list .scrape-help{border-color:#555;color:#333;}.scraped-example-list .scrape-help:hover{border-color:black;color:black;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.toggle-line-inner{background:#ccc;}.toggle-line:hover .toggle-line-inner{background:#999;} \ No newline at end of file + body,#settings-menu #settings,#settings-menu #settings::before{background-color:white;color:black;}.setting-line .radio-line input{border-color:black;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px white;background-color:#2196f3;}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px #2196f3;}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px white,0 0 2px 2px #2196f3;}.setting-line .radio-line input:hover{border-color:#2196f3 !important;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#DDDDDD;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar,.mobile-topbar,.sidebar-menu-toggle{background-color:#F5F5F5;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.rust-logo{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current,.sidebar a:hover{background-color:#fff;}.source .sidebar{background-color:#f1f1f1;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#ddd;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}.sidebar a{color:#356da4;}.sidebar a.current.enum{color:#a63283;}.sidebar a.current.struct{color:#a63283;}.sidebar a.current.type{color:#a63283;}.sidebar a.current.associatedtype{color:#356da4;}.sidebar a.current.foreigntype{color:#356da4;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#067901;}.sidebar a.current.union{color:#a63283;}.sidebar a.current.constant .sidebar a.current.static{color:#356da4;}.sidebar a.current.primitive{color:#a63283;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#356da4;}.sidebar a.current.trait{color:#6849c3;}.sidebar a.current.traitalias{color:#4b349e;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#a67736;}.sidebar a.current.keyword{color:#356da4;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#000;}.search-results a{color:initial;}a.test-arrow{color:#f5f5f5;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search,.search-input{background-color:white;border-color:#e0e0e0 !important;}.search-input:focus{border-color:#66afe9;}.module-item .stab,.import-item .stab{color:#000;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}.rightside,.out-of-band{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgb(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#3873AD;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F5F5F5;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F5F5F5;border-right-color:#000;}#sidebar-filler{background-color:#F5F5F5;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button{border-color:#e0e0e0;background-color:#fff;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#settings-menu #settings,#settings-menu #settings::before{border-color:#DDDDDD;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F5F5F5;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F5F5F5;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.scraped-example-list .scrape-help{border-color:#555;color:#333;}.scraped-example-list .scrape-help:hover{border-color:black;color:black;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.toggle-line-inner{background:#ccc;}.toggle-line:hover .toggle-line-inner{background:#999;} \ No newline at end of file diff --git a/doc/main.js b/doc/main.js index 54450c1..a756f49 100644 --- a/doc/main.js +++ b/doc/main.js @@ -1,8 +1,8 @@ -"use strict";if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){const l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVar(name){const el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}(function(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");window.searchJS=resourcePath("search",".js");window.searchIndexJS=resourcePath("search-index",".js");window.settingsJS=resourcePath("settings",".js");const sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,};const mobileLocationTitle=document.querySelector(".mobile-topbar h2.location");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}const THEME_PICKER_ELEMENT_ID="theme-picker";const THEMES_ELEMENT_ID="theme-choices";const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){const themePicker=getThemePickerElement();const themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){const themePicker=getThemePickerElement();const themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}window.hideSettings=()=>{};(function(){if(!document.location.href.startsWith("file:///")){return}const themeChoices=getThemesElement();const themePicker=getThemePickerElement();const availableThemes=getVar("themes").split(",");removeClass(themeChoices.parentElement,"hidden");function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){const active=document.activeElement;const related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(item=>{const but=document.createElement("button");but.textContent=item;but.onclick=()=>{switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssFileName){const link=document.createElement("link");link.href=resourcePath(cssFileName,".css");link.type="text/css";link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}(function(){function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss("settings");loadScript(window.settingsJS)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:()=>{switchDisplayedElement(null);document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},};function getPageId(){if(window.location.hash){const tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown");handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){searchState.clearInputTimeout();const help=getHelpElement(false);if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else{switchDisplayedElement(null);if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}ev.preventDefault()}searchState.defocus();hideThemeButtonState()}const disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}let themePicker;if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){const active=document.activeElement;const themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);window.initSidebarItems=items=>{const sidebar=document.getElementsByClassName("sidebar-elems")[0];let others;const current=window.sidebarCurrent;function addSidebarCrates(crates){if(!hasClass(document.body,"crate")){return}const div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";const ul=document.createElement("ul");div.appendChild(ul);for(const crate of crates){let klass="crate";if(window.rootPath!=="./"&&crate===window.currentCrate){klass+=" current"}const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.className=klass;link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}others.appendChild(div)}function block(shortty,id,longty){const filtered=items[shortty];if(!filtered){return}const div=document.createElement("div");div.className="block "+shortty;const h3=document.createElement("h3");h3.innerHTML=`${longty}`;div.appendChild(h3);const ul=document.createElement("ul");for(const item of filtered){const name=item[0];const desc=item[1];let klass=shortty;if(name===current.name&&shortty===current.ty){klass+=" current"}let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const link=document.createElement("a");link.href=current.relpath+path;link.title=desc;link.className=klass;link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}div.appendChild(ul);others.appendChild(div)}if(sidebar){others=document.createElement("div");others.className="others";sidebar.appendChild(others);const isModule=hasClass(document.body,"mod");if(!isModule){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}addSidebarCrates(window.ALL_CRATES)}};window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector("h1.fqn > .in-band > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const ignoreExternCrates=document.querySelector("script[data-ignore-extern-crates]").getAttribute("data-ignore-extern-crates");for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.indexOf(lib)!==-1){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct.synthetic?synthetic_implementors:implementors;if(struct.synthetic){for(const struct_type of struct.types){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct.text;addClass(code,"code-header");addClass(code,"in-band");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&href.indexOf("http")!==0){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}let sectionIsCollapsed=false;if(hasClass(innerToggle,"will-expand")){removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs"}else{addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});sectionIsCollapsed=true;innerToggle.title="expand all docs"}innerToggle.children[0].innerText=labelForToggleButton(sectionIsCollapsed)}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});const pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());(function(){let lineNumbersFunc=()=>{};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=x=>{const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{if(hasClass(e,"compile_fail")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#f00"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}else if(hasClass(e,"ignore")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#ff9200"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}lineNumbersFunc(e)})}());function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}function handleClick(id,f){const elem=document.getElementById(id);if(elem){elem.addEventListener("click",f)}}handleClick("help-button",ev=>{displayHelp(true,ev)});handleClick(MAIN_ID,()=>{hideSidebar()});onEachLazy(document.getElementsByTagName("a"),el=>{if(el.hash){el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})}});onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),e=>{e.onclick=function(){this.getElementsByClassName("notable-traits-tooltiptext")[0].classList.toggle("force-tooltip")}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){addClass(sidebar,"shown")}else{removeClass(sidebar,"shown")}})}let buildHelperPopup=()=>{const popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",ev=>{if(ev.target===popup){displayHelp(false,ev)}});const book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ - the rustdoc book.";const container=document.createElement("div");const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":" "+y+" ").join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ +"use strict";if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){const l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVar(name){const el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}(function(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate")}());function setMobileTopbar(){const mobileLocationTitle=document.querySelector(".mobile-topbar h2.location");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}window.hideSettings=()=>{};function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssFileName){const link=document.createElement("link");link.href=resourcePath(cssFileName,".css");link.type="text/css";link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}(function(){function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss("settings");loadScript(resourcePath("settings",".js"))};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:()=>{switchDisplayedElement(null);document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(resourcePath("search",".js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},};function getPageId(){if(window.location.hash){const tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown");handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){searchState.clearInputTimeout();const help=getHelpElement(false);if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else{switchDisplayedElement(null);if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}ev.preventDefault()}searchState.defocus();window.hideSettings()}const disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const div=document.createElement("div");div.className="block "+shortty;const h3=document.createElement("h3");h3.innerHTML=`${longty}`;div.appendChild(h3);const ul=document.createElement("ul");for(const item of filtered){const name=item[0];const desc=item[1];let klass=shortty;let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();if(path===current_page){klass+=" current"}const link=document.createElement("a");link.href=path;link.title=desc;link.className=klass;link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}div.appendChild(ul);sidebar.appendChild(div)}if(sidebar){const isModule=hasClass(document.body,"mod");if(!isModule){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector("h1.fqn > .in-band > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const ignoreExternCrates=document.querySelector("script[data-ignore-extern-crates]").getAttribute("data-ignore-extern-crates");for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.indexOf(lib)!==-1){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct.synthetic?synthetic_implementors:implementors;if(struct.synthetic){for(const struct_type of struct.types){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct.text;addClass(code,"code-header");addClass(code,"in-band");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&href.indexOf("http")!==0){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";const ul=document.createElement("ul");div.appendChild(ul);for(const crate of window.ALL_CRATES){let klass="crate";if(window.rootPath!=="./"&&crate===window.currentCrate){klass+=" current"}const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.className=klass;link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(div)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}let sectionIsCollapsed=false;if(hasClass(innerToggle,"will-expand")){removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs"}else{addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});sectionIsCollapsed=true;innerToggle.title="expand all docs"}innerToggle.children[0].innerText=labelForToggleButton(sectionIsCollapsed)}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});const pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());(function(){let lineNumbersFunc=()=>{};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=x=>{const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{if(hasClass(e,"compile_fail")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#f00"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}else if(hasClass(e,"ignore")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#ff9200"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}lineNumbersFunc(e)})}());function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}function handleClick(id,f){const elem=document.getElementById(id);if(elem){elem.addEventListener("click",f)}}handleClick("help-button",ev=>{displayHelp(true,ev)});handleClick(MAIN_ID,()=>{hideSidebar()});onEachLazy(document.getElementsByTagName("a"),el=>{if(el.hash){el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})}});onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),e=>{e.onclick=function(){this.getElementsByClassName("notable-traits-tooltiptext")[0].classList.toggle("force-tooltip")}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){addClass(sidebar,"shown")}else{removeClass(sidebar,"shown")}})}let buildHelperPopup=()=>{const popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",ev=>{if(ev.target===popup){displayHelp(false,ev)}});const book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ + the rustdoc book.";const container=document.createElement("div");const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

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

"+x+"

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

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,document.querySelector("main"));buildHelperPopup=()=>{}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;window.copy_path=but=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

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

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,document.querySelector("main"));buildHelperPopup=()=>{}};setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;window.copy_path=but=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/doc/noscript.css b/doc/noscript.css index 8ad8864..d850bb3 100644 --- a/doc/noscript.css +++ b/doc/noscript.css @@ -1 +1 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}.sub{display:none;}#theme-picker{display:none;} \ No newline at end of file + #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}.sub{display:none;} \ No newline at end of file diff --git a/doc/rustdoc.css b/doc/rustdoc.css index 46b5877..26904c7 100644 --- a/doc/rustdoc.css +++ b/doc/rustdoc.css @@ -1 +1 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:20px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}h1.fqn{margin:0;padding:0;}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}.main-heading a:hover{text-decoration:underline;}#toggle-all-docs{text-decoration:none;}h2,.top-doc h3,.top-doc h4{border-bottom:1px solid;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;border-bottom-style:none;margin:0;padding:0;margin-top:0.6em;margin-bottom:0.4em;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,.out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main-content>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.docblock.item-decl{margin-left:0;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{max-width:none;overflow:visible;margin-left:0px;}nav.sub{position:relative;font-size:1rem;}.sub-container{display:flex;flex-direction:row;flex-wrap:nowrap;}.sub-logo-container{display:none;margin-right:20px;}.source .sub-logo-container{display:block;}.source .sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar{font-size:0.875rem;width:250px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.sidebar-elems,.sidebar>.location{padding-left:24px;}.sidebar .location{overflow-wrap:anywhere;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.source .sidebar>*:not(#sidebar-toggle){opacity:0;visibility:hidden;}.source .sidebar.expanded{overflow-y:auto;}.source .sidebar.expanded>*:not(#sidebar-toggle){opacity:1;visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.block{padding:0;}.block ul,.block li{padding:0;margin:0;list-style:none;}.block a,h2.location a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{border-bottom:none;font-weight:500;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;font-weight:500;padding:0;margin:0;}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.example-wrap>pre.rust a:hover{text-decoration:underline;}.line-numbers{text-align:right;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre.line-numbers{width:auto;overflow-x:visible;}.rustdoc .example-wrap>pre{margin:0;}#search{position:relative;}.search-loading{text-align:center;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information):not(.more-examples-toggle){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;font-size:1.125rem;font-weight:normal;float:right;}.method>.code-header,.trait-impl>.code-header{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;overflow-wrap:break-word;overflow-wrap:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}#main-content{position:relative;}#main-content>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.125rem;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1rem;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.875rem;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.item-info{display:block;}.content .item-info code{font-size:0.875rem;}.content .item-info{position:relative;margin-left:24px;}.sub-variant>div>.item-info{margin-top:initial;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;margin-bottom:25px;}.source nav.sub{margin-left:32px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.docblock a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.docblock-short a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.item-info a{text-decoration:underline;}.block a.current.crate{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-container{position:relative;display:flex;height:34px;}.search-container>*{height:100%;}.search-results-title{display:inline;}#search-settings{font-size:1.5rem;font-weight:500;margin-bottom:20px;}#crate-search{min-width:115px;margin-top:5px;margin-left:0.25em;padding-left:0.3125em;padding-right:23px;border:0;border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");}.search-container{margin-top:4px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:1px solid;border-radius:2px;padding:8px;font-size:1rem;transition:border-color 300ms ease;width:100%;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{text-align:center;display:block;margin:10px 0;border-bottom:1px solid;padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.item-info .stab{display:inline-block;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.25rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.rightside{float:right;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.code-attribute{font-weight:300;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1rem;font-weight:400;border-bottom:none;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:1.25rem;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;}#titles>button:first-child:last-child{margin-right:1px;width:calc(100% - 1px);}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;cursor:pointer;font-weight:bold;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;z-index:1;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:-38px;top:4px;}.theme-picker button{outline:none;}#settings-menu,#help-button{margin-left:4px;outline:none;}#theme-picker,#copy-path{height:34px;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:5px;width:33px;border:1px solid;border-radius:2px;cursor:pointer;}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate img{animation:rotating 2s linear infinite;}#help-button{font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:20px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);overflow-wrap:normal;}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:1rem;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:1.125rem;display:block;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main-content>ul{padding-left:10px;}#main-content>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.625rem;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.undocumented[open] >summary::before,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.undocumented>summary::before,details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}.sidebar.expanded+main .width-limiter .sub-logo-container.rust-logo{display:none;}.source .sidebar.expanded{width:300px;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.rustdoc,.main-heading{flex-direction:column;}.content .out-of-band{text-align:left;margin-left:initial;padding:initial;}.content .out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar-elems{margin-top:1em;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;background-color:rgba(0,0,0,0);margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.source .sidebar{top:0;padding:0;}.sidebar.shown,.sidebar.expanded,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{position:fixed;margin:0;z-index:11;width:0;}.mobile-topbar .location a{padding:0;margin:0;}.mobile-topbar .location{border:none;padding:0;margin:auto 0.5em auto auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:24px;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.source .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;}.source nav:not(.sidebar).sub{margin-left:32px;}#theme-picker{display:none;width:0;}.content{margin-left:0px;}.source .content{margin-top:10px;}#search{margin-left:0;padding:0;}.anchor{display:none !important;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}.sidebar.expanded #sidebar-toggle{font-size:1.5rem;}.sidebar:not(.expanded) #sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;border:1px solid;border-left:0;}#source-sidebar{z-index:11;}#main-content>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}.source .sidebar.expanded{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main-content>table:not(.table-display) td{word-break:break-word;width:50%;}#crate-search{border-radius:4px;border:0;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}.sub-container{flex-direction:column;}.sub-logo-container{align-self:center;}.source .sub-logo-container>img{height:35px;width:35px;}.sidebar:not(.expanded) #sidebar-toggle{top:10px;}}.method-toggle summary,.implementors-toggle summary,.impl{margin-bottom:0.75em;}.method-toggle[open]{margin-bottom:2em;}.implementors-toggle[open]{margin-bottom:2em;}#trait-implementations-list .method-toggle,#synthetic-implementations-list .method-toggle,#blanket-implementations-list .method-toggle{margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;background:transparent;border-width:1px;border-style:solid;border-radius:50px;}.scraped-example-title{font-family:'Fira Sans';}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:240px;}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow-x:hidden;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;}.scraped-example .code-wrapper .line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;margin-bottom:5px;cursor:pointer;}.more-examples-toggle summary,.more-examples-toggle .hide-more{font-family:'Fira Sans';}.more-scraped-examples{margin-left:5px;display:flex;flex-direction:row;}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;font-family:'Fira Sans';}.example-links ul{margin-bottom:0;} \ No newline at end of file + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:20px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}h1.fqn{margin:0;padding:0;}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}.main-heading a:hover{text-decoration:underline;}#toggle-all-docs{text-decoration:none;}h2,.top-doc h3,.top-doc h4{border-bottom:1px solid;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;border-bottom-style:none;margin:0;padding:0;margin-top:0.6em;margin-bottom:0.4em;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,.out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main-content>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.docblock.item-decl{margin-left:0;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{max-width:none;overflow:visible;margin-left:0px;}nav.sub{position:relative;font-size:1rem;}.sub-container{display:flex;flex-direction:row;flex-wrap:nowrap;}.sub-logo-container{display:none;margin-right:20px;}.source .sub-logo-container{display:block;}.source .sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar{font-size:0.875rem;width:250px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.sidebar-elems,.sidebar>.location{padding-left:24px;}.sidebar .location{overflow-wrap:anywhere;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.rustdoc.source .sidebar .sidebar-logo{display:none;}.source .sidebar>*:not(#sidebar-toggle){opacity:0;visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;}.source-sidebar-expanded .source .sidebar>*:not(#sidebar-toggle){opacity:1;visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.block{padding:0;}.block ul,.block li{padding:0;margin:0;list-style:none;}.block a,h2.location a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{border-bottom:none;font-weight:500;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;font-weight:500;padding:0;margin:0;}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.example-wrap>pre.rust a:hover{text-decoration:underline;}.line-numbers{text-align:right;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre.line-numbers{width:auto;overflow-x:visible;}.rustdoc .example-wrap>pre{margin:0;}#search{position:relative;}.search-loading{text-align:center;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information):not(.more-examples-toggle){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;font-size:1.125rem;font-weight:normal;float:right;}.method>.code-header,.trait-impl>.code-header{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;overflow-wrap:break-word;overflow-wrap:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}#main-content{position:relative;}#main-content>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.125rem;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1rem;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.875rem;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.item-info{display:block;}.content .item-info code{font-size:0.875rem;}.content .item-info{position:relative;margin-left:24px;}.sub-variant>div>.item-info{margin-top:initial;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;margin-bottom:25px;}.source nav.sub{margin-left:32px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.docblock a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.docblock-short a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.item-info a{text-decoration:underline;}.block a.current.crate{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-container{position:relative;display:flex;height:34px;}.search-container>*{height:100%;}.search-results-title{display:inline;}#search-settings{font-size:1.5rem;font-weight:500;margin-bottom:20px;}#crate-search{min-width:115px;margin-top:5px;margin-left:0.25em;padding-left:0.3125em;padding-right:23px;border:1px solid;border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");}.search-container{margin-top:4px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:1px solid;border-radius:2px;padding:8px;font-size:1rem;transition:border-color 300ms ease;width:100%;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{text-align:center;display:block;margin:10px 0;border-bottom:1px solid;padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.item-info .stab{display:inline-block;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.25rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.rightside{float:right;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.code-attribute{font-weight:300;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1rem;font-weight:400;border-bottom:none;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:1.25rem;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;}#titles>button:first-child:last-child{margin-right:1px;width:calc(100% - 1px);}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;cursor:pointer;font-weight:bold;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;z-index:1;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid;margin-bottom:6px;}#settings-menu,#help-button{margin-left:4px;outline:none;}#copy-path{height:34px;}#settings-menu>a,#help-button,#copy-path{padding:5px;width:33px;border:1px solid;border-radius:2px;cursor:pointer;}#settings-menu{padding:0;}#settings-menu>a{padding:5px;width:100%;height:100%;display:block;}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}#help-button{font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:20px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);overflow-wrap:normal;}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:1rem;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:1.125rem;display:block;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main-content>ul{padding-left:10px;}#main-content>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.625rem;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.undocumented[open] >summary::before,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.undocumented>summary::before,details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}.source-sidebar-expanded .source .sidebar+main .width-limiter .sub-logo-container.rust-logo{display:none;}.source-sidebar-expanded .source .sidebar{width:300px;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.rustdoc,.main-heading{flex-direction:column;}.content .out-of-band{text-align:left;margin-left:initial;padding:initial;}.content .out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar-elems{margin-top:1em;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;background-color:rgba(0,0,0,0);margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.source .sidebar{top:0;padding:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{position:fixed;margin:0;z-index:11;width:0;}.mobile-topbar .location a{padding:0;margin:0;}.mobile-topbar .location{border:none;padding:0;margin:auto 0.5em auto auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:24px;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.source .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;}.source nav:not(.sidebar).sub{margin-left:32px;}.content{margin-left:0px;}.source .content{margin-top:10px;}#search{margin-left:0;padding:0;}.anchor{display:none !important;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}#sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;border:1px solid;border-left:0;}.source-sidebar-expanded #sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;}#source-sidebar{z-index:11;}#main-content>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main-content>table:not(.table-display) td{word-break:break-word;width:50%;}#crate-search{border-radius:4px;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}.sub-container{flex-direction:column;}.sub-logo-container{align-self:center;}.source .sub-logo-container>img{height:35px;width:35px;}#sidebar-toggle{top:10px;}.source-sidebar-expanded #sidebar-toggle{top:unset;}}.method-toggle summary,.implementors-toggle summary,.impl{margin-bottom:0.75em;}.method-toggle[open]{margin-bottom:2em;}.implementors-toggle[open]{margin-bottom:2em;}#trait-implementations-list .method-toggle,#synthetic-implementations-list .method-toggle,#blanket-implementations-list .method-toggle{margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;background:transparent;border-width:1px;border-style:solid;border-radius:50px;}.scraped-example-title{font-family:'Fira Sans';}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:240px;}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow-x:hidden;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;}.scraped-example .code-wrapper .line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;margin-bottom:5px;cursor:pointer;}.more-examples-toggle summary,.more-examples-toggle .hide-more{font-family:'Fira Sans';}.more-scraped-examples{margin-left:5px;display:flex;flex-direction:row;}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;font-family:'Fira Sans';}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/doc/search-index.js b/doc/search-index.js index 3ffc5fc..1e739b6 100644 --- a/doc/search-index.js +++ b/doc/search-index.js @@ -1,4 +1,5 @@ var searchIndex = JSON.parse('{\ -"draught":{"doc":"Draught","t":[2,2,2,2,17,0,0,0,5,14,14,0,0,3,3,3,3,17,17,3,17,17,17,17,17,17,17,17,17,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,13,13,13,13,13,13,13,13,13,4,4,13,13,13,13,4,4,4,13,13,13,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,12,12,12,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,12,11,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,17,17,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,12,12,11,12,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,17,17,17,17,17,17,17,17,17,3,17,17,17,17,17,17,12,12,12,11,11,12,12,11,11,12,11,11,11,11,11,12,11,11,11,12,11,11,11,12,12,12,11,11,11,11,12,12,12,11,11,11,11,12,11,11,11,11,11,12,12,12,12,5],"n":["Board","Computer","Game","Painter","__wasm_bindgen_generated_init_wasm__const","board","comp","game","init_wasm","log","log_error","paint","utils","Board","BrdIdx","Direction","Piece","STD_HEIGHT","STD_WIDTH","Square","__wbg_get_board_current_turn__const","__wbg_get_board_height__const","__wbg_get_board_width__const","__wbg_get_brdidx_col__const","__wbg_get_brdidx_row__const","__wbg_get_piece_strength__const","__wbg_get_piece_team__const","__wbg_get_square_occupant__const","__wbg_get_square_state__const","adjacent_dir","adjacent_indices","apply_jump","apply_move","board_index","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","can_move","cell","cell_idx","cell_index","cell_mut","cell_state","cells","cells","check_jumpee_team","check_kinged","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","col","current_turn","describe","describe","describe","describe","empty","empty","enums","eq","eq","eq","eq","eq","eq","filter_indices","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from_abi","from_abi","from_abi","from_abi","grid_cell","height","idx_diffs","init_game","into","into","into","into","into","into_abi","into_abi","into_abi","into_abi","is_none","is_none","is_none","is_none","iter","jumpable_dir","jumpable_indices","jumpee_idx","king_row_idx","ne","ne","ne","ne","ne","ne","new","new","new","none","none","none","none","num_cells","num_pieces","num_player","nw","occupant","pc","player_adjacent_indices","player_jumpable_indices","ref_from_abi","ref_from_abi","ref_from_abi","ref_from_abi","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi","return_abi","return_abi","return_abi","return_abi","row","score","se","set_cell","state","strength","sw","team","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","unplay","validate_jumpee","validate_king_move","validate_man_move","vzip","vzip","vzip","vzip","vzip","width","Allowed","Black","Empty","IllegalTrajectory","Jump","JumpingSameTeam","King","Man","Move","MoveType","Moveable","NoJumpablePiece","Occupied","OccupiedDest","OutOfBounds","SquareState","Strength","Team","UnoccupiedSrc","Unplayable","Unplayable","White","WrongTeamSrc","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","describe","describe","describe","describe","describe","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_abi","from_abi","from_abi","from_abi","from_abi","into","into","into","into","into","into_abi","into_abi","into_abi","into_abi","into_abi","is_none","is_none","is_none","is_none","is_none","none","none","none","none","none","opponent","return_abi","return_abi","return_abi","return_abi","return_abi","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","PieceIterator","RowIndexIterator","RowSquareIterator","board","board","board","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","from","from","from","index_cursor","index_iter","into","into","into","into_iter","into_iter","into_iter","new","new","new","next","next","next","row_cursor","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","BoardNode","Computer","Move","available_turns","best_score","board","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","brd","clone","clone","clone_into","clone_into","eq","eq","expand_layer","expand_node","fmt","fmt","fmt","from","from","from","from","gen_tree","get_leaf_nodes","get_move","get_move_boards","insert_board_scores","insert_boards","into","into","into","last_node_count","mv_type","ne","ne","new","new","new","perfect_chance","propagate_scores","random_choice","score","search_depth","team","to","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","Game","__wbg_get_game_last_node_count__const","__wbg_get_game_perfect_chance__const","ai_move","borrow","borrow_mut","clear_selected","current","current_board","current_board_cells","current_board_len","current_cell_state","current_turn","describe","draw","execute_jump","execute_move","fmt","fmt","from","from_abi","has_won","into","into_abi","is_none","last_node_count","make_move","new","new_with_canvas","none","painter","perfect_chance","previous_board","previous_boards","push_new_board","ref_from_abi","ref_mut_from_abi","return_abi","score","search_depth","selected_piece","set_current","set_painter","set_perfect_chance","set_search_depth","set_selected","to_string","try_from","try_into","type_id","vzip","winning","BLACK_PIECE","BLACK_PIECE_OUTLINE","BLACK_SQUARE","DRAW_OUTLINE","DRAW_PIECE_OUTLINES","KING_OUTLINE","OUTLINE_WIDTH","PIECE_OUTLINE_PROPORTION","PIECE_PROPORTION","Painter","SELECTED_PIECE","SELECTED_PIECE_OUTLINE","SQUARE_OUTLINE","WHITE_PIECE","WHITE_PIECE_OUTLINE","WHITE_SQUARE","black_piece","black_piece_line","black_square","borrow","borrow_mut","canvas","context","describe","draw","draw_outline","fmt","from","from_abi","get_canvas","get_canvas_context","height","into","into_abi","is_none","king_line","new","new_with_canvas","none","outline_width","piece_line_proportion","piece_lines","ref_from_abi","ref_mut_from_abi","reset_dimensions","return_abi","selected_idx","selected_piece","selected_piece_line","set_draw_outline","set_outline_width","set_selected","set_square_outline","square_outline","try_from","try_into","type_id","validate_board_dim","vzip","white_piece","white_piece_line","white_square","width","set_panic_hook"],"q":["draught","","","","","","","","","","","","","draught::board","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::board::enums","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::board::iter","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::comp","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::game","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::paint","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::utils"],"d":["","","","","","Board module for components related to the checkers board …","AI player logic","Top-level object for managing Boards, applying and …","","Wrap the web_sys access to the browser console in a macro …","","Components for painting board states onto HTML canvases","","Single state of a checkers board","Rank 2 tensor index to identify a board square by row and …","Standard diagonal movements given by north west/east etc","Game piece given by its team and strength (normal or …","Standard height of a checkers board is 8 squares","Standard width of a checkers board is 8 squares","Board squares given by a state and a possible occupying …","","","","","","","","","","Get a Direction structure for the diagonally adjacent …","Get the 1D array indices for the diagonally adjacent …","Get new board derived from current with given jump applied","Get new board derived from current with given move applied","Transform a 1D array index (for Board::cells) into a 2D …","","","","","","","","","","","Check whether a move given by source and destination …","Get a copy of a board square by 1D array index","Similar to Board::cell_index but with a BrdIdx instead of …","Transform a 2D row/column board index into a single 1D …","Get a mutable reference to a board square by 1D array index","Get the state of a board square by 1D array index","Get a pointer to the backing array of board squares, …","1D backing array of board squares for the 2D game board","Check that the source piece and the jumpee are of opposing …","Check and apply king strength","","","","","","","","","","","","","","","","","Create an empty direction full of Option::None","Helper function for a well-formed empty square","","","","","","","","Filter an array of diagonal indices (Like those from …","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Get a copy of a board square by 2D BrdIdx index","","Get the difference between two BrdIdx objects","Reset the given board to a starting layout with 3 rows of …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","Get a Direction structure for the diagonally jumpable …","Get the 1D array indices for the diagonally jumpable …","Get cell index of jumpee square given from and to locations","Get row index for current team, top row for black, bottom …","","","","","","North East","","Standard constructor function to form square from state …","Initialise a game board without game pieces","","","","","Get the number of board squares","Get the number of remaining pieces","Get the number of remaining pieces for a player","North West ","Game piece if square is occupied","Helper function for a well-formed piece square by team and …","","","","","","","","","","","","","","","","Get the score value, Black - White pieces","South East","Get a copy of a board square by 1D array index","Description of whether the square is occupied or an …","","South West","","","","","","","","","","","","","","","","","","","","","","","","Helper function for a well-formed unplayable square","Unwrap the jumpee piece from the square and …","Check that given move trajectory is valid for a king piece ","Check that given move trajectory is valid for a man piece ","","","","","","","","","","","","","","","","Move/Jump, for use in Move","Possible outcomes of trying to move","","","","","Model board square as Empty/Occupied/Unplayable","Man/King","Black/White","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","Get opposing team","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","Get next item from the iterator","Get next item from the iterator","Get next item from the iterator","","","","","","","","","","","","","","For storing boards in the AI tree, stores board with score …","Root-level structure for managing the game as a collection …","Represents a move by source/destination indices and the …","Get vector of available moves for a given board","Get best of given scores for given team","","","","","","","","","","","","","","","Expand all given nodes and return newly inserted layer of …","Insert all possible next boards as children of given board …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Generate tree of boards to given search depth, return root …","Traverse tree from given root ID and get NodeIDs of leaf …","Get a new board based on the given using MiniMax to make …","Get all possible next boards from given board","For given NodeIDs, insert score of board into tree Used …","Insert given boards into tree","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","Propagate scores up the tree employing MiniMax algorithm","Get a random board from possible node IDs and associated …","","","","","","","","","","","","","","","","","","","Root-level structure for managing the game as a collection …","","","Create computer, get move from current board and update …","","","Clear currently selected piece","","Set current board to given","Get pointer to current board’s squares","Get pointer to current board’s squares","Get square on current board for given index","Current turn’s team","","Draw current board using painter if exists","Update board state with given jump move and push new board …","Update board state with given move and push new board into …","","","Returns the argument unchanged.","","Check if a player has won","Calls U::from(self).","","","","Attempt to make a move given a source and destination index","Get new game without board renderer","Get a new game with canvas ID and dimensions","","","","Get a read-only copy of a previous turn’s board","","Push current board into the previous turns and set given …","","","","Current board’s score","","","Set current board to given","Set painter for rendering boards","Set proportion of perfect moves from AI","Set tree depth for AI to search to","Set given index as selected piece TODO: Check whether …","","","","","","Get currently winning player","Default hex colour value for black pieces","Default hex colour value for black piece outline","Default hex colour value for black square background","Whether to outline black squares","Whether to outline pieces","Default hex colour value for black piece outline","Line width when outlining black squares as proportion of …","Line width for outlining pieces as proportion of piece …","Proportion of square that piece fills as proportion of min …","Used to paint boards onto HTML canvases","Default hex colour value for selected piece","Default hex colour value for selected piece outline","Default hex colour value for outline of black squares","Default hex colour value for white pieces","Default hex colour value for white piece outline","Default hex colour value for white square background","","","","","","","","","Draw a board onto the canvas","","","Returns the argument unchanged.","","Get a canvas by element ID","Get a 2D canvas context for a given canvas","","Calls U::from(self).","","","","Default constructor which queries for canvas by ID","Constructor with given canvas element","","","","","","","Reset the canvas dimensions to the given width and height","","","","","Set whether squares are outlined","Set new line width for outlining squares","Set selected piece by board index","Set new square outline colour value","","","","","Check whether given canvas dimensions divide evenly by …","","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,3,4,5,1,2,3,4,5,1,1,1,1,1,1,1,1,1,1,1,2,3,4,5,1,2,3,4,5,1,5,1,2,4,5,1,3,4,0,2,3,4,5,5,1,1,2,3,4,5,5,1,1,2,3,4,5,5,1,2,4,5,1,1,1,1,1,2,3,4,5,1,2,4,5,1,2,4,5,1,0,1,1,1,1,2,3,4,5,1,3,2,4,1,2,4,5,1,1,1,1,3,4,4,1,1,2,4,5,1,2,4,5,1,2,4,5,1,5,1,3,1,4,2,3,2,2,3,4,5,1,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,4,1,1,1,2,3,4,5,1,1,6,7,8,6,9,6,10,10,9,0,0,6,8,6,6,0,0,0,6,8,6,7,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,7,10,8,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,7,9,7,10,8,6,9,7,10,8,6,7,8,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,0,0,0,11,12,13,11,12,13,11,12,13,11,12,13,13,12,11,12,13,11,12,13,11,12,13,11,12,13,11,11,12,13,11,12,13,11,12,13,11,12,13,0,0,0,14,14,15,16,15,14,16,15,14,15,16,15,16,15,16,15,14,14,16,15,14,16,15,14,16,14,14,14,14,14,14,16,15,14,14,16,16,15,16,15,14,14,14,14,15,14,14,16,16,15,16,15,14,16,15,14,16,15,14,16,15,14,0,0,0,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0],"f":[null,null,null,null,null,null,null,null,[[]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0],["brdidx",3]],["option",4,[["direction",3,[["square",3]]]]]],[[["",0],["brdidx",3]],["option",4,[["vec",3,[["usize",0]]]]]],[[["",0],["brdidx",3],["brdidx",3]],["board",3]],[[["",0],["brdidx",3],["brdidx",3]],["board",3]],[[["",0],["usize",0]],["brdidx",3]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0],["brdidx",3],["brdidx",3]],["moveable",4]],[[["",0],["usize",0]],["square",3]],[[["",0],["brdidx",3]],["usize",0]],[[["",0],["usize",0],["usize",0]],["usize",0]],[[["",0],["usize",0]],["square",3]],[[["",0],["usize",0]],["squarestate",4]],[[["",0]]],null,[[["piece",3],["piece",3]],["bool",0]],[[["board",3],["brdidx",3]]],[[["",0]],["piece",3]],[[["",0]],["direction",3]],[[["",0]],["square",3]],[[["",0]],["brdidx",3]],[[["",0]],["board",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],null,null,[[]],[[]],[[]],[[]],[[],["direction",3]],[[],["square",3]],null,[[["",0],["piece",3]],["bool",0]],[[["",0],["direction",3]],["bool",0]],[[["",0],["square",3]],["bool",0]],[[["",0],["brdidx",3]],["bool",0]],[[["",0],["brdidx",3]],["bool",0]],[[["",0],["board",3]],["bool",0]],[[["",0],["brdidx",3],["team",4],["vec",3,[["usize",0]]]],["vec",3,[["usize",0]]]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[]],[[]],[[]],[[["usize",0],["usize",0]],["brdidx",3]],[[]],[[]],[[["u32",0]]],[[["u32",0]]],[[["u32",0]]],[[["u32",0]]],[[["",0],["brdidx",3]],["square",3]],null,[[["brdidx",3],["brdidx",3]]],[[["board",3],["usize",0]],["board",3]],[[]],[[]],[[]],[[]],[[]],[[],["u32",0]],[[],["u32",0]],[[],["u32",0]],[[],["u32",0]],[[],["bool",0]],[[],["bool",0]],[[],["bool",0]],[[],["bool",0]],null,[[["",0],["brdidx",3]],["option",4,[["direction",3,[["square",3]]]]]],[[["",0],["brdidx",3]],["option",4,[["vec",3,[["usize",0]]]]]],[[["",0],["brdidx",3],["brdidx",3]],["usize",0]],[[["",0]],["usize",0]],[[["",0],["piece",3]],["bool",0]],[[["",0],["direction",3]],["bool",0]],[[["",0],["square",3]],["bool",0]],[[["",0],["brdidx",3]],["bool",0]],[[["",0],["board",3]],["bool",0]],null,[[["team",4],["strength",4]],["piece",3]],[[["squarestate",4],["option",4,[["piece",3]]]],["square",3]],[[["usize",0],["usize",0],["team",4]],["board",3]],[[]],[[]],[[]],[[]],[[["",0]],["usize",0]],[[["",0]],["usize",0]],[[["",0],["team",4]],["usize",0]],null,null,[[["team",4],["strength",4]],["square",3]],[[["",0],["brdidx",3],["team",4]],["option",4,[["vec",3,[["usize",0]]]]]],[[["",0],["brdidx",3],["team",4]],["option",4,[["vec",3,[["usize",0]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],null,[[["",0]],["isize",0]],null,[[["",0],["usize",0],["square",3]]],null,null,null,null,[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]],["string",3]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[],["square",3]],[[["square",3],["piece",3]],["moveable",4]],[[["",0],["brdidx",3],["brdidx",3],["piece",3]],["moveable",4]],[[["",0],["brdidx",3],["brdidx",3],["piece",3]],["moveable",4]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["movetype",4]],[[["",0]],["team",4]],[[["",0]],["strength",4]],[[["",0]],["squarestate",4]],[[["",0]],["moveable",4]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[]],[[]],[[]],[[]],[[]],[[["",0],["movetype",4]],["bool",0]],[[["",0],["team",4]],["bool",0]],[[["",0],["strength",4]],["bool",0]],[[["",0],["squarestate",4]],["bool",0]],[[["",0],["moveable",4]],["bool",0]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[["u32",0]]],[[["u32",0]]],[[["u32",0]]],[[["u32",0]]],[[["u32",0]]],[[]],[[]],[[]],[[]],[[]],[[],["u32",0]],[[],["u32",0]],[[],["u32",0]],[[],["u32",0]],[[],["u32",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[]],[[]],[[]],[[]],[[]],[[["",0]],["team",4]],[[]],[[]],[[]],[[]],[[]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]],["string",3]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[]],[[]],[[]],null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[["board",3]]],[[["board",3]]],[[["board",3]]],[[["",0]],["option",4,[["vec",3,[["usize",0]]]]]],[[["",0]],["option",4,[["vec",3,[["square",3]]]]]],[[["",0]],["option",4]],null,[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]],[[]],[[]],null,null,null,[[["",0],["board",3]],["vec",3,[["move",3]]]],[[["board",3],["vec",3,[["isize",0]]]],["isize",0]],null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["board",3]],["boardnode",3]],[[["",0]],["move",3]],[[["",0]],["boardnode",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["move",3]],["bool",0]],[[["",0],["boardnode",3]],["bool",0]],[[["",0],["arena",3],["vec",3,[["nodeid",3]]]],["vec",3,[["nodeid",3]]]],[[["",0],["arena",3],["nodeid",3]],["vec",3,[["nodeid",3]]]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[]],[[]],[[]],null,[[["",0],["arena",3],["board",3]],["nodeid",3]],[[["",0],["arena",3],["nodeid",3]],["vec",3,[["nodeid",3]]]],[[["",0],["board",3]],["option",4,[["board",3]]]],[[["",0],["boardnode",3]],["vec",3,[["boardnode",3]]]],[[["",0],["arena",3],["vec",3,[["nodeid",3]]]]],[[["",0],["arena",3],["vec",3,[["boardnode",3]]]],["vec",3,[["nodeid",3]]]],[[]],[[]],[[]],null,null,[[["",0],["move",3]],["bool",0]],[[["",0],["boardnode",3]],["bool",0]],[[["brdidx",3],["brdidx",3],["movetype",4]],["move",3]],[[["board",3],["isize",0]],["boardnode",3]],[[["usize",0],["team",4],["f64",0]],["computer",3]],null,[[["arena",3,[["boardnode",3]]],["nodeid",3]],["arena",3,[["boardnode",3]]]],[[["arena",3],["vec",3,[["nodeid",3]]],["threadrng",3]],["board",3]],null,null,null,null,[[["",0]]],[[["",0]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]],[[]],[[]],null,null,null,[[["",0]]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]]],null,[[["",0]],["board",3]],[[["",0]]],[[["",0]],["usize",0]],[[["",0],["brdidx",3]],["square",3]],[[["",0]],["team",4]],[[]],[[["",0]]],[[["",0],["brdidx",3],["brdidx",3]]],[[["",0],["brdidx",3],["brdidx",3]]],[[["",0],["formatter",3]],["result",6]],[[["",0],["formatter",3]],["result",6]],[[]],[[["u32",0]]],[[["",0]],["option",4,[["team",4]]]],[[]],[[],["u32",0]],[[],["bool",0]],null,[[["",0],["brdidx",3],["brdidx",3]],["moveable",4]],[[["usize",0],["usize",0],["usize",0],["team",4],["usize",0]],["game",3]],[[["usize",0],["usize",0],["usize",0],["team",4],["usize",0],["str",0],["u32",0],["u32",0]],["game",3]],[[]],null,null,[[["",0],["usize",0]],["board",3]],null,[[["",0],["board",3]]],[[]],[[]],[[]],[[["",0]],["isize",0]],null,null,[[["",0],["board",3]]],[[["",0],["painter",3]]],[[["",0],["f64",0]]],[[["",0],["usize",0]]],[[["",0],["brdidx",3]]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[]],[[["",0]],["option",4,[["team",4]]]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],null,null,[[]],[[["",0],["board",3]]],null,[[["",0],["formatter",3]],["result",6]],[[]],[[["u32",0]]],[[["str",0]],["htmlcanvaselement",3]],[[["htmlcanvaselement",3]],["canvasrenderingcontext2d",3]],null,[[]],[[],["u32",0]],[[],["bool",0]],null,[[["u32",0],["u32",0],["str",0]],["painter",3]],[[["u32",0],["u32",0],["htmlcanvaselement",3]],["painter",3]],[[]],null,null,null,[[]],[[]],[[["",0]]],[[]],null,null,null,[[["",0],["bool",0]]],[[["",0],["f64",0]]],[[["",0],["option",4]]],[[["",0],["jsvalue",3]]],null,[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0],["board",3]],["bool",0]],[[]],null,null,null,null,[[]]],"p":[[3,"Board"],[3,"Piece"],[3,"Direction"],[3,"Square"],[3,"BrdIdx"],[4,"Moveable"],[4,"Team"],[4,"SquareState"],[4,"MoveType"],[4,"Strength"],[3,"RowIndexIterator"],[3,"RowSquareIterator"],[3,"PieceIterator"],[3,"Computer"],[3,"BoardNode"],[3,"Move"],[3,"Game"],[3,"Painter"]]}\ +"draught":{"doc":"Draught","t":[2,2,2,2,17,0,0,0,5,14,14,0,0,3,3,3,3,17,17,3,17,17,17,17,17,17,17,17,17,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,13,13,13,13,13,13,13,13,13,4,4,13,13,13,13,4,4,4,13,13,13,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,12,12,12,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,12,11,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,17,17,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,12,12,11,12,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,17,17,17,17,17,17,17,17,17,3,17,17,17,17,17,17,12,12,12,11,11,12,12,11,11,12,11,11,11,11,11,12,11,11,11,12,11,11,11,12,12,12,11,11,11,11,12,12,12,11,11,11,11,12,11,11,11,11,11,12,12,12,12,5],"n":["Board","Computer","Game","Painter","__wasm_bindgen_generated_init_wasm__const","board","comp","game","init_wasm","log","log_error","paint","utils","Board","BrdIdx","Direction","Piece","STD_HEIGHT","STD_WIDTH","Square","__wbg_get_board_current_turn__const","__wbg_get_board_height__const","__wbg_get_board_width__const","__wbg_get_brdidx_col__const","__wbg_get_brdidx_row__const","__wbg_get_piece_strength__const","__wbg_get_piece_team__const","__wbg_get_square_occupant__const","__wbg_get_square_state__const","adjacent_dir","adjacent_indices","apply_jump","apply_move","board_index","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","can_move","cell","cell_idx","cell_index","cell_mut","cell_state","cells","cells","check_jumpee_team","check_kinged","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","col","current_turn","describe","describe","describe","describe","empty","empty","enums","eq","eq","eq","eq","eq","eq","filter_indices","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from_abi","from_abi","from_abi","from_abi","grid_cell","height","idx_diffs","init_game","into","into","into","into","into","into_abi","into_abi","into_abi","into_abi","is_none","is_none","is_none","is_none","iter","jumpable_dir","jumpable_indices","jumpee_idx","king_row_idx","ne","ne","ne","ne","ne","ne","new","new","new","none","none","none","none","num_cells","num_pieces","num_player","nw","occupant","pc","player_adjacent_indices","player_jumpable_indices","ref_from_abi","ref_from_abi","ref_from_abi","ref_from_abi","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi","ref_mut_from_abi","return_abi","return_abi","return_abi","return_abi","row","score","se","set_cell","state","strength","sw","team","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","unplay","validate_jumpee","validate_king_move","validate_man_move","vzip","vzip","vzip","vzip","vzip","width","Allowed","Black","Empty","IllegalTrajectory","Jump","JumpingSameTeam","King","Man","Move","MoveType","Moveable","NoJumpablePiece","Occupied","OccupiedDest","OutOfBounds","SquareState","Strength","Team","UnoccupiedSrc","Unplayable","Unplayable","White","WrongTeamSrc","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","describe","describe","describe","describe","describe","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_abi","from_abi","from_abi","from_abi","from_abi","into","into","into","into","into","into_abi","into_abi","into_abi","into_abi","into_abi","is_none","is_none","is_none","is_none","is_none","none","none","none","none","none","opponent","return_abi","return_abi","return_abi","return_abi","return_abi","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","PieceIterator","RowIndexIterator","RowSquareIterator","board","board","board","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","from","from","from","index_cursor","index_iter","into","into","into","into_iter","into_iter","into_iter","new","new","new","next","next","next","row_cursor","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","BoardNode","Computer","Move","available_turns","best_score","board","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","brd","clone","clone","clone_into","clone_into","eq","eq","expand_layer","expand_node","fmt","fmt","fmt","from","from","from","from","gen_tree","get_leaf_nodes","get_move","get_move_boards","insert_board_scores","insert_boards","into","into","into","last_node_count","mv_type","ne","ne","new","new","new","perfect_chance","propagate_scores","random_choice","score","search_depth","team","to","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","Game","__wbg_get_game_last_node_count__const","__wbg_get_game_perfect_chance__const","ai_move","borrow","borrow_mut","clear_selected","current","current_board","current_board_cells","current_board_len","current_cell_state","current_turn","describe","draw","execute_jump","execute_move","fmt","fmt","from","from_abi","has_won","into","into_abi","is_none","last_node_count","make_move","new","new_with_canvas","none","painter","perfect_chance","previous_board","previous_boards","push_new_board","ref_from_abi","ref_mut_from_abi","return_abi","score","search_depth","selected_piece","set_current","set_painter","set_perfect_chance","set_search_depth","set_selected","to_string","try_from","try_into","type_id","vzip","winning","BLACK_PIECE","BLACK_PIECE_OUTLINE","BLACK_SQUARE","DRAW_OUTLINE","DRAW_PIECE_OUTLINES","KING_OUTLINE","OUTLINE_WIDTH","PIECE_OUTLINE_PROPORTION","PIECE_PROPORTION","Painter","SELECTED_PIECE","SELECTED_PIECE_OUTLINE","SQUARE_OUTLINE","WHITE_PIECE","WHITE_PIECE_OUTLINE","WHITE_SQUARE","black_piece","black_piece_line","black_square","borrow","borrow_mut","canvas","context","describe","draw","draw_outline","fmt","from","from_abi","get_canvas","get_canvas_context","height","into","into_abi","is_none","king_line","new","new_with_canvas","none","outline_width","piece_line_proportion","piece_lines","ref_from_abi","ref_mut_from_abi","reset_dimensions","return_abi","selected_idx","selected_piece","selected_piece_line","set_draw_outline","set_outline_width","set_selected","set_square_outline","square_outline","try_from","try_into","type_id","validate_board_dim","vzip","white_piece","white_piece_line","white_square","width","set_panic_hook"],"q":["draught","","","","","","","","","","","","","draught::board","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::board::enums","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::board::iter","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::comp","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::game","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::paint","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","draught::utils"],"d":["","","","","","Board module for components related to the checkers board …","AI player logic","Top-level object for managing Boards, applying and …","","Wrap the web_sys access to the browser console in a macro …","","Components for painting board states onto HTML canvases","","Single state of a checkers board","Rank 2 tensor index to identify a board square by row and …","Standard diagonal movements given by north west/east etc","Game piece given by its team and strength (normal or …","Standard height of a checkers board is 8 squares","Standard width of a checkers board is 8 squares","Board squares given by a state and a possible occupying …","","","","","","","","","","Get a Direction structure for the diagonally adjacent …","Get the 1D array indices for the diagonally adjacent …","Get new board derived from current with given jump applied","Get new board derived from current with given move applied","Transform a 1D array index (for Board::cells) into a 2D …","","","","","","","","","","","Check whether a move given by source and destination …","Get a copy of a board square by 1D array index","Similar to Board::cell_index but with a BrdIdx instead of …","Transform a 2D row/column board index into a single 1D …","Get a mutable reference to a board square by 1D array index","Get the state of a board square by 1D array index","Get a pointer to the backing array of board squares, …","1D backing array of board squares for the 2D game board","Check that the source piece and the jumpee are of opposing …","Check and apply king strength","","","","","","","","","","","","","","","","","Create an empty direction full of Option::None","Helper function for a well-formed empty square","","","","","","","","Filter an array of diagonal indices (Like those from …","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Get a copy of a board square by 2D BrdIdx index","","Get the difference between two BrdIdx objects","Reset the given board to a starting layout with 3 rows of …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","Get a Direction structure for the diagonally jumpable …","Get the 1D array indices for the diagonally jumpable …","Get cell index of jumpee square given from and to locations","Get row index for current team, top row for black, bottom …","","","","","","North East","","Standard constructor function to form square from state …","Initialise a game board without game pieces","","","","","Get the number of board squares","Get the number of remaining pieces","Get the number of remaining pieces for a player","North West ","Game piece if square is occupied","Helper function for a well-formed piece square by team and …","","","","","","","","","","","","","","","","Get the score value, Black - White pieces","South East","Get a copy of a board square by 1D array index","Description of whether the square is occupied or an …","","South West","","","","","","","","","","","","","","","","","","","","","","","","Helper function for a well-formed unplayable square","Unwrap the jumpee piece from the square and …","Check that given move trajectory is valid for a king piece ","Check that given move trajectory is valid for a man piece ","","","","","","","","","","","","","","","","Move/Jump, for use in Move","Possible outcomes of trying to move","","","","","Model board square as Empty/Occupied/Unplayable","Man/King","Black/White","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","Get opposing team","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","Get next item from the iterator","Get next item from the iterator","Get next item from the iterator","","","","","","","","","","","","","","For storing boards in the AI tree, stores board with score …","Root-level structure for managing the game as a collection …","Represents a move by source/destination indices and the …","Get vector of available moves for a given board","Get best of given scores for given team","","","","","","","","","","","","","","","Expand all given nodes and return newly inserted layer of …","Insert all possible next boards as children of given board …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Generate tree of boards to given search depth, return root …","Traverse tree from given root ID and get NodeIDs of leaf …","Get a new board based on the given using MiniMax to make …","Get all possible next boards from given board","For given NodeIDs, insert score of board into tree Used …","Insert given boards into tree","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","Propagate scores up the tree employing MiniMax algorithm","Get a random board from possible node IDs and associated …","","","","","","","","","","","","","","","","","","","Root-level structure for managing the game as a collection …","","","Create computer, get move from current board and update …","","","Clear currently selected piece","","Set current board to given","Get pointer to current board’s squares","Get pointer to current board’s squares","Get square on current board for given index","Current turn’s team","","Draw current board using painter if exists","Update board state with given jump move and push new board …","Update board state with given move and push new board into …","","","Returns the argument unchanged.","","Check if a player has won","Calls U::from(self).","","","","Attempt to make a move given a source and destination index","Get new game without board renderer","Get a new game with canvas ID and dimensions","","","","Get a read-only copy of a previous turn’s board","","Push current board into the previous turns and set given …","","","","Current board’s score","","","Set current board to given","Set painter for rendering boards","Set proportion of perfect moves from AI","Set tree depth for AI to search to","Set given index as selected piece TODO: Check whether …","","","","","","Get currently winning player","Default hex colour value for black pieces","Default hex colour value for black piece outline","Default hex colour value for black square background","Whether to outline black squares","Whether to outline pieces","Default hex colour value for black piece outline","Line width when outlining black squares as proportion of …","Line width for outlining pieces as proportion of piece …","Proportion of square that piece fills as proportion of min …","Used to paint boards onto HTML canvases","Default hex colour value for selected piece","Default hex colour value for selected piece outline","Default hex colour value for outline of black squares","Default hex colour value for white pieces","Default hex colour value for white piece outline","Default hex colour value for white square background","","","","","","","","","Draw a board onto the canvas","","","Returns the argument unchanged.","","Get a canvas by element ID","Get a 2D canvas context for a given canvas","","Calls U::from(self).","","","","Default constructor which queries for canvas by ID","Constructor with given canvas element","","","","","","","Reset the canvas dimensions to the given width and height","","","","","Set whether squares are outlined","Set new line width for outlining squares","Set selected piece by board index","Set new square outline colour value","","","","","Check whether given canvas dimensions divide evenly by …","","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,3,4,5,1,2,3,4,5,1,1,1,1,1,1,1,1,1,1,1,2,3,4,5,1,2,3,4,5,1,5,1,2,4,5,1,3,4,0,2,3,4,5,5,1,1,2,3,4,5,5,1,1,2,3,4,5,5,1,2,4,5,1,1,1,1,1,2,3,4,5,1,2,4,5,1,2,4,5,1,0,1,1,1,1,2,3,4,5,1,3,2,4,1,2,4,5,1,1,1,1,3,4,4,1,1,2,4,5,1,2,4,5,1,2,4,5,1,5,1,3,1,4,2,3,2,2,3,4,5,1,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,4,1,1,1,2,3,4,5,1,1,6,7,8,6,9,6,10,10,9,0,0,6,8,6,6,0,0,0,6,8,6,7,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,7,10,8,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,7,9,7,10,8,6,9,7,10,8,6,7,8,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,9,7,10,8,6,0,0,0,11,12,13,11,12,13,11,12,13,11,12,13,13,12,11,12,13,11,12,13,11,12,13,11,12,13,11,11,12,13,11,12,13,11,12,13,11,12,13,0,0,0,14,14,15,16,15,14,16,15,14,15,16,15,16,15,16,15,14,14,16,15,14,16,15,14,16,14,14,14,14,14,14,16,15,14,14,16,16,15,16,15,14,14,14,14,15,14,14,16,16,15,16,15,14,16,15,14,16,15,14,16,15,14,0,0,0,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0],"f":[null,null,null,null,null,null,null,null,[[]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["board",3],["brdidx",3]],["option",4,[["direction",3,[["square",3]]]]]],[[["board",3],["brdidx",3]],["option",4,[["vec",3,[["usize",0]]]]]],[[["board",3],["brdidx",3],["brdidx",3]],["board",3]],[[["board",3],["brdidx",3],["brdidx",3]],["board",3]],[[["board",3],["usize",0]],["brdidx",3]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["board",3],["brdidx",3],["brdidx",3]],["moveable",4]],[[["board",3],["usize",0]],["square",3]],[[["board",3],["brdidx",3]],["usize",0]],[[["board",3],["usize",0],["usize",0]],["usize",0]],[[["board",3],["usize",0]],["square",3]],[[["board",3],["usize",0]],["squarestate",4]],[[["board",3]],["square",0]],null,[[["piece",3],["piece",3]],["bool",0]],[[["board",3],["brdidx",3]]],[[["piece",3]],["piece",3]],[[["direction",3,[["",26,[["clone",8],["clone",8],["copy",8]]]]]],["direction",3,[["",26,[["clone",8],["clone",8],["copy",8]]]]]],[[["square",3]],["square",3]],[[["brdidx",3]],["brdidx",3]],[[["board",3]],["board",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],null,null,[[]],[[]],[[]],[[]],[[],["direction",3,[["",26,[["clone",8],["copy",8]]]]]],[[],["square",3]],null,[[["piece",3],["piece",3]],["bool",0]],[[["direction",3,[["",26,[["partialeq",8],["clone",8],["copy",8]]]]],["direction",3]],["bool",0]],[[["square",3],["square",3]],["bool",0]],[[["brdidx",3],["brdidx",3]],["bool",0]],[[["brdidx",3],["brdidx",3]],["bool",0]],[[["board",3],["board",3]],["bool",0]],[[["board",3],["brdidx",3],["team",4],["vec",3,[["usize",0]]]],["vec",3,[["usize",0]]]],[[["piece",3],["formatter",3]],["result",6]],[[["direction",3,[["",26,[["debug",8],["clone",8],["copy",8]]]]],["formatter",3]],["result",6]],[[["square",3],["formatter",3]],["result",6]],[[["brdidx",3],["formatter",3]],["result",6]],[[["brdidx",3],["formatter",3]],["result",6]],[[["board",3],["formatter",3]],["result",6]],[[["board",3],["formatter",3]],["result",6]],[[]],[[]],[[]],[[["usize",0],["usize",0]],["brdidx",3]],[[]],[[]],[[["u32",0]],["piece",3]],[[["u32",0]],["square",3]],[[["u32",0]],["brdidx",3]],[[["u32",0]],["board",3]],[[["board",3],["brdidx",3]],["square",3]],null,[[["brdidx",3],["brdidx",3]]],[[["board",3],["usize",0]],["board",3]],[[]],[[]],[[]],[[]],[[]],[[["piece",3]],["u32",0]],[[["square",3]],["u32",0]],[[["brdidx",3]],["u32",0]],[[["board",3]],["u32",0]],[[],["bool",0]],[[],["bool",0]],[[],["bool",0]],[[],["bool",0]],null,[[["board",3],["brdidx",3]],["option",4,[["direction",3,[["square",3]]]]]],[[["board",3],["brdidx",3]],["option",4,[["vec",3,[["usize",0]]]]]],[[["board",3],["brdidx",3],["brdidx",3]],["usize",0]],[[["board",3]],["usize",0]],[[["piece",3],["piece",3]],["bool",0]],[[["direction",3,[["",26,[["partialeq",8],["clone",8],["copy",8]]]]],["direction",3]],["bool",0]],[[["square",3],["square",3]],["bool",0]],[[["brdidx",3],["brdidx",3]],["bool",0]],[[["board",3],["board",3]],["bool",0]],null,[[["team",4],["strength",4]],["piece",3]],[[["squarestate",4],["option",4,[["piece",3]]]],["square",3]],[[["usize",0],["usize",0],["team",4]],["board",3]],[[]],[[]],[[]],[[]],[[["board",3]],["usize",0]],[[["board",3]],["usize",0]],[[["board",3],["team",4]],["usize",0]],null,null,[[["team",4],["strength",4]],["square",3]],[[["board",3],["brdidx",3],["team",4]],["option",4,[["vec",3,[["usize",0]]]]]],[[["board",3],["brdidx",3],["team",4]],["option",4,[["vec",3,[["usize",0]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],null,[[["board",3]],["isize",0]],null,[[["board",3],["usize",0],["square",3]]],null,null,null,null,[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]],["string",3]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[],["square",3]],[[["square",3],["piece",3]],["moveable",4]],[[["board",3],["brdidx",3],["brdidx",3],["piece",3]],["moveable",4]],[[["board",3],["brdidx",3],["brdidx",3],["piece",3]],["moveable",4]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["movetype",4]],["movetype",4]],[[["team",4]],["team",4]],[[["strength",4]],["strength",4]],[[["squarestate",4]],["squarestate",4]],[[["moveable",4]],["moveable",4]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[]],[[]],[[]],[[]],[[]],[[["movetype",4],["movetype",4]],["bool",0]],[[["team",4],["team",4]],["bool",0]],[[["strength",4],["strength",4]],["bool",0]],[[["squarestate",4],["squarestate",4]],["bool",0]],[[["moveable",4],["moveable",4]],["bool",0]],[[["movetype",4],["formatter",3]],["result",6]],[[["team",4],["formatter",3]],["result",6]],[[["team",4],["formatter",3]],["result",6]],[[["strength",4],["formatter",3]],["result",6]],[[["squarestate",4],["formatter",3]],["result",6]],[[["squarestate",4],["formatter",3]],["result",6]],[[["moveable",4],["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[["u32",0]],["movetype",4]],[[["u32",0]],["team",4]],[[["u32",0]],["strength",4]],[[["u32",0]],["squarestate",4]],[[["u32",0]],["moveable",4]],[[]],[[]],[[]],[[]],[[]],[[["movetype",4]],["u32",0]],[[["team",4]],["u32",0]],[[["strength",4]],["u32",0]],[[["squarestate",4]],["u32",0]],[[["moveable",4]],["u32",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[["u32",0]],["bool",0]],[[]],[[]],[[]],[[]],[[]],[[["team",4]],["team",4]],[[]],[[]],[[]],[[]],[[]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]],["string",3]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[]],[[]],[[]],null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[["board",3]],["rowindexiterator",3]],[[["board",3]],["rowsquareiterator",3]],[[["board",3]],["pieceiterator",3]],[[["rowindexiterator",3]],["option",4,[["vec",3,[["usize",0]]]]]],[[["rowsquareiterator",3]],["option",4,[["vec",3,[["square",3]]]]]],[[["pieceiterator",3]],["option",4]],null,[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]],[[]],[[]],null,null,null,[[["computer",3],["board",3]],["vec",3,[["move",3]]]],[[["board",3],["vec",3,[["isize",0]]]],["isize",0]],null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["board",3]],["boardnode",3]],[[["move",3]],["move",3]],[[["boardnode",3]],["boardnode",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["move",3],["move",3]],["bool",0]],[[["boardnode",3],["boardnode",3]],["bool",0]],[[["computer",3],["arena",3],["vec",3,[["nodeid",3]]]],["vec",3,[["nodeid",3]]]],[[["computer",3],["arena",3],["nodeid",3]],["vec",3,[["nodeid",3]]]],[[["move",3],["formatter",3]],["result",6]],[[["boardnode",3],["formatter",3]],["result",6]],[[["computer",3],["formatter",3]],["result",6]],[[]],[[]],[[]],null,[[["computer",3],["arena",3],["board",3]],["nodeid",3]],[[["computer",3],["arena",3],["nodeid",3]],["vec",3,[["nodeid",3]]]],[[["computer",3],["board",3]],["option",4,[["board",3]]]],[[["computer",3],["boardnode",3]],["vec",3,[["boardnode",3]]]],[[["computer",3],["arena",3],["vec",3,[["nodeid",3]]]]],[[["computer",3],["arena",3],["vec",3,[["boardnode",3]]]],["vec",3,[["nodeid",3]]]],[[]],[[]],[[]],null,null,[[["move",3],["move",3]],["bool",0]],[[["boardnode",3],["boardnode",3]],["bool",0]],[[["brdidx",3],["brdidx",3],["movetype",4]],["move",3]],[[["board",3],["isize",0]],["boardnode",3]],[[["usize",0],["team",4],["f64",0]],["computer",3]],null,[[["arena",3,[["boardnode",3]]],["nodeid",3]],["arena",3,[["boardnode",3]]]],[[["arena",3],["vec",3,[["nodeid",3]]],["threadrng",3]],["board",3]],null,null,null,null,[[["",0]]],[[["",0]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[]],[[]],[[]],null,null,null,[[["game",3]]],[[["",0]],["",0]],[[["",0]],["",0]],[[["game",3]]],null,[[["game",3]],["board",3]],[[["game",3]],["square",0]],[[["game",3]],["usize",0]],[[["game",3],["brdidx",3]],["square",3]],[[["game",3]],["team",4]],[[]],[[["game",3]]],[[["game",3],["brdidx",3],["brdidx",3]]],[[["game",3],["brdidx",3],["brdidx",3]]],[[["game",3],["formatter",3]],["result",6]],[[["game",3],["formatter",3]],["result",6]],[[]],[[["u32",0]],["game",3]],[[["game",3]],["option",4,[["team",4]]]],[[]],[[["game",3]],["u32",0]],[[],["bool",0]],null,[[["game",3],["brdidx",3],["brdidx",3]],["moveable",4]],[[["usize",0],["usize",0],["usize",0],["team",4],["usize",0]],["game",3]],[[["usize",0],["usize",0],["usize",0],["team",4],["usize",0],["str",0],["u32",0],["u32",0]],["game",3]],[[]],null,null,[[["game",3],["usize",0]],["board",3]],null,[[["game",3],["board",3]]],[[]],[[]],[[]],[[["game",3]],["isize",0]],null,null,[[["game",3],["board",3]]],[[["game",3],["painter",3]]],[[["game",3],["f64",0]]],[[["game",3],["usize",0]]],[[["game",3],["brdidx",3]]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[]],[[["game",3]],["option",4,[["team",4]]]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],null,null,[[]],[[["painter",3],["board",3]]],null,[[["painter",3],["formatter",3]],["result",6]],[[]],[[["u32",0]],["painter",3]],[[["str",0]],["htmlcanvaselement",3]],[[["htmlcanvaselement",3]],["canvasrenderingcontext2d",3]],null,[[]],[[["painter",3]],["u32",0]],[[],["bool",0]],null,[[["u32",0],["u32",0],["str",0]],["painter",3]],[[["u32",0],["u32",0],["htmlcanvaselement",3]],["painter",3]],[[]],null,null,null,[[]],[[]],[[["painter",3]]],[[]],null,null,null,[[["painter",3],["bool",0]]],[[["painter",3],["f64",0]]],[[["painter",3],["option",4]]],[[["painter",3],["jsvalue",3]]],null,[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["painter",3],["board",3]],["bool",0]],[[]],null,null,null,null,[[]]],"p":[[3,"Board"],[3,"Piece"],[3,"Direction"],[3,"Square"],[3,"BrdIdx"],[4,"Moveable"],[4,"Team"],[4,"SquareState"],[4,"MoveType"],[4,"Strength"],[3,"RowIndexIterator"],[3,"RowSquareIterator"],[3,"PieceIterator"],[3,"Computer"],[3,"BoardNode"],[3,"Move"],[3,"Game"],[3,"Painter"]]}\ }'); -if (window.initSearch) {window.initSearch(searchIndex)}; \ No newline at end of file +if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; +if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/doc/search.js b/doc/search.js index 860a595..8fd46df 100644 --- a/doc/search.js +++ b/doc/search.js @@ -1 +1 @@ -"use strict";(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("titles").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb}else if(nb!=0){printTab(0)}}const levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}const s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){let i1=0,i2=0,a,b,c,c2;const row=levenshtein_row2;while(i1{const MAX_LEV_DISTANCE=3;const MAX_RESULTS=200;const GENERICS_DATA=2;const NAME=0;const INPUTS_DATA=0;const OUTPUT_DATA=1;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;const ALIASES=Object.create(null);const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-".indexOf(c)!==-1}function isStopCharacter(c){return isWhitespace(c)||isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){for(let i=0,len=itemTypes.length;i0){throw new Error("Cannot use literal search when there is more than one element")}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw new Error("Unclosed `\"`")}else if(parserState.userQuery[end]!=="\""){throw new Error(`Unexpected \`${parserState.userQuery[end]}\` in a string element`)}else if(start===end){throw new Error("Cannot have empty string element")}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)=="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)=="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||isWhitespaceCharacter(c)}function isWhitespaceCharacter(c){return c===" "||c==="\t"}function createQueryElement(query,parserState,name,generics,isInGenerics){if(name==="*"||(name.length===0&&generics.length===0)){return}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw new Error("You cannot have more than one element if you use quotes")}const pathSegments=name.split("::");if(pathSegments.length>1){for(let i=0,len=pathSegments.length;i=end){throw new Error("Found generics without a path")}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;while(parserState.pos"){extra="`<`"}else if(endChar===""){extra="`->`"}throw new Error("Unexpected `"+c+"` after "+extra)}if(!foundStopChar){if(endChar!==""){throw new Error(`Expected \`,\`, \` \` or \`${endChar}\`, found \`${c}\``)}throw new Error(`Expected \`,\` or \` \`, found \`${c}\``)}const posBefore=parserState.pos;getNextElem(query,parserState,elems,endChar===">");if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}parserState.pos+=1}function checkExtraTypeFilterCharacters(parserState){const query=parserState.userQuery;for(let pos=0;pos"){if(isReturnArrow(parserState)){break}throw new Error(`Unexpected \`${c}\` (did you mean \`->\`?)`)}throw new Error(`Unexpected \`${c}\``)}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw new Error("Unexpected `:`")}if(query.elems.length===0){throw new Error("Expected type filter before `:`")}else if(query.elems.length!==1||parserState.totalElems!==1){throw new Error("Unexpected `:`")}else if(query.literalSearch){throw new Error("You cannot use quotes on type filter")}checkExtraTypeFilterCharacters(parserState);parserState.typeFilter=query.elems.pop().name;parserState.pos+=1;parserState.totalElems=0;query.literalSearch=false;foundStopChar=true;continue}if(!foundStopChar){if(parserState.typeFilter!==null){throw new Error(`Expected \`,\`, \` \` or \`->\`, found \`${c}\``)}throw new Error(`Expected \`,\`, \` \`, \`:\` or \`->\`, found \`${c}\``)}before=query.elems.length;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}while(parserState.pos`")}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),typeFilter:NO_TYPE_FILTER,elems:[],returned:[],foundElems:0,literalSearch:false,error:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);if(parserState.typeFilter!==null){let typeFilter=parserState.typeFilter;if(typeFilter==="const"){typeFilter="constant"}query.typeFilter=itemTypeFromName(typeFilter)}}catch(err){query=newParsedQuery(userQuery);query.error=err.message;query.typeFilter=-1;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates){const results_others={},results_in_args={},results_returned={};function transformResults(results){const duplicates={};const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.lev=result.lev;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates[obj.fullPath]){continue}duplicates[obj.fullPath]=true;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){const userQuery=parsedQuery.userQuery;const ar=[];for(const entry in results){if(hasOwnPropertyRustdoc(results,entry)){const result=results[entry];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};ar.push(result)}}results=ar;if(results.length===0){return[]}results.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==window.currentCrate);b=(bbb.item.crate!==window.currentCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of results){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(results)}function checkGenerics(row,elem,defaultLev){if(row.length<=GENERICS_DATA||row[GENERICS_DATA].length===0){return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}else if(row[GENERICS_DATA].length>0&&row[GENERICS_DATA][0][NAME]===""){if(row.length>GENERICS_DATA){return checkGenerics(row[GENERICS_DATA][0],elem,defaultLev)}return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}let elem_name;if(elem.generics.length>0&&row[GENERICS_DATA].length>=elem.generics.length){const elems=Object.create(null);for(const entry of row[GENERICS_DATA]){elem_name=entry[NAME];if(elem_name===""){if(checkGenerics(entry,elem,MAX_LEV_DISTANCE+1)!==0){return MAX_LEV_DISTANCE+1}continue}if(elems[elem_name]===undefined){elems[elem_name]=0}elems[elem_name]+=1}for(const generic of elem.generics){let match=null;if(elems[generic.name]){match=generic.name}else{for(elem_name in elems){if(!hasOwnPropertyRustdoc(elems,elem_name)){continue}if(elem_name===generic){match=elem_name;break}}}if(match===null){return MAX_LEV_DISTANCE+1}elems[match]-=1;if(elems[match]===0){delete elems[match]}}return 0}return MAX_LEV_DISTANCE+1}function checkIfInGenerics(row,elem){let lev=MAX_LEV_DISTANCE+1;for(const entry of row[GENERICS_DATA]){lev=Math.min(checkType(entry,elem,true),lev);if(lev===0){break}}return lev}function checkType(row,elem,literalSearch){if(row[NAME].length===0){if(row.length>GENERICS_DATA){return checkIfInGenerics(row,elem)}return MAX_LEV_DISTANCE+1}let lev=levenshtein(row[NAME],elem.name);if(literalSearch){if(lev!==0){if(elem.generics.length===0){const checkGeneric=(row.length>GENERICS_DATA&&row[GENERICS_DATA].length>0);if(checkGeneric&&row[GENERICS_DATA].findIndex(tmp_elem=>tmp_elem[NAME]===elem.name)!==-1){return 0}}return MAX_LEV_DISTANCE+1}else if(elem.generics.length>0){return checkGenerics(row,elem,MAX_LEV_DISTANCE+1)}return 0}else if(row.length>GENERICS_DATA){if(elem.generics.length===0){if(lev===0){return 0}lev=checkIfInGenerics(row,elem);return lev+0.5}else if(lev>MAX_LEV_DISTANCE){return checkIfInGenerics(row,elem)}else{const tmp_lev=checkGenerics(row,elem,lev);if(tmp_lev>MAX_LEV_DISTANCE){return MAX_LEV_DISTANCE+1}return(tmp_lev+lev)/2}}else if(elem.generics.length>0){return MAX_LEV_DISTANCE+1}return lev}function findArg(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type[INPUTS_DATA]&&row.type[INPUTS_DATA].length>0){for(const input of row.type[INPUTS_DATA]){if(!typePassesFilter(typeFilter,input[1])){continue}lev=Math.min(lev,checkType(input,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkReturned(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type.length>OUTPUT_DATA){let ret=row.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(const ret_ty of ret){if(!typePassesFilter(typeFilter,ret_ty[1])){continue}lev=Math.min(lev,checkType(ret_ty,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkPath(contains,ty){if(contains.length===0){return 0}let ret_lev=MAX_LEV_DISTANCE+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(let i=0;ilength){break}let lev_total=0;let aborted=false;for(let x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES[filterCrates]&&ALIASES[filterCrates][lowerQuery]){const query_aliases=ALIASES[filterCrates][lowerQuery];for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{Object.keys(ALIASES).forEach(crate=>{if(ALIASES[crate][lowerQuery]){const pushTo=crate===window.currentCrate?crateAliases:aliases;const query_aliases=ALIASES[crate][lowerQuery];for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}})}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}function addIntoResults(results,fullId,id,index,lev){if(lev===0||(!parsedQuery.literalSearch&&lev<=MAX_LEV_DISTANCE)){if(results[fullId]!==undefined){const result=results[fullId];if(result.dontValidate||result.lev<=lev){return}}results[fullId]={id:id,index:index,dontValidate:parsedQuery.literalSearch,lev:lev,}}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let lev,lev_add=0,index=-1;const fullId=row.id;const in_args=findArg(row,elem,parsedQuery.typeFilter);const returned=checkReturned(row,elem,parsedQuery.typeFilter);addIntoResults(results_in_args,fullId,pos,index,in_args);addIntoResults(results_returned,fullId,pos,index,returned);if(!typePassesFilter(parsedQuery.typeFilter,row.ty)){return}const searchWord=searchWords[pos];if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,-1,0)}return}if(elem.name.length===0){if(row.type!==null){lev=checkGenerics(row.type,elem,MAX_LEV_DISTANCE+1);addIntoResults(results_others,fullId,pos,index,lev)}return}if(elem.fullPath.length>1){lev=checkPath(elem.pathWithoutLast,row);if(lev>MAX_LEV_DISTANCE||(parsedQuery.literalSearch&&lev!==0)){return}else if(lev>0){lev_add=lev/10}}if(searchWord.indexOf(elem.pathLast)>-1||row.normalizedName.indexOf(elem.pathLast)>-1){if(!results_others[fullId]!==undefined){index=row.normalizedName.indexOf(elem.pathLast)}}lev=levenshtein(searchWord,elem.pathLast);if(lev>0&&elem.pathLast.length>2&&searchWord.indexOf(elem.pathLast)>-1){if(elem.pathLast.length<6){lev=1}else{lev=0}}lev+=lev_add;if(lev>MAX_LEV_DISTANCE){return}else if(index!==-1&&elem.fullPath.length<2){lev-=1}if(lev<0){lev=0}addIntoResults(results_others,fullId,pos,index,lev)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let totalLev=0;let nbLev=0;function checkArgs(elems,callback){for(const elem of elems){const lev=callback(row,elem,NO_TYPE_FILTER);if(lev<=1){nbLev+=1;totalLev+=lev}else{return false}}return true}if(!checkArgs(parsedQuery.elems,findArg)){return}if(!checkArgs(parsedQuery.returned,checkReturned)){return}if(nbLev===0){return}const lev=Math.round(totalLev/nbLev);addIntoResults(results,row.id,pos,0,lev)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||levenshtein(name,key)<=MAX_LEV_DISTANCE)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){const h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];length+=1;let extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const wrapper=document.createElement("div");const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);const description=document.createElement("div");description.className="desc";const spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(window.ALL_CRATES.length>1){crates=" in "}let typeFilter="";if(results.query.typeFilter!==NO_TYPE_FILTER){typeFilter=" (type: "+escape(itemTypes[results.query.typeFilter])+")"}let output="
"+`

Results for ${escape(results.query.userQuery)}`+`${typeFilter}

in ${crates}
`;if(results.query.error!==null){output+=`

Query parser error: "${results.query.error}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("titles").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>{printTab(j)};searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function search(e,forced){const params=searchState.getQueryStringParams();const query=parseQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}let filterCrates=getFilterCrates();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";if(browserSupportsHistoryApi()){const newURL=buildUrl(query.original,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execQuery(query,searchWords,filterCrates),params.go_to_first,filterCrates)}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];let i,word;let currentIndex=0;let id=0;for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=crateCorpus.q;const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const paths=crateCorpus.p;const aliases=crateCorpus.a;let len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]=Object.create(null);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}for(const local_alias of aliases[alias_name]){ALIASES[crate][alias_name].push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="All crates"){const params=searchState.getQueryStringParams();const query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);registerSearchEvents();function runSearchIfNeeded(){if(searchState.getQueryStringParams().search){search()}}runSearchIfNeeded()};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() \ No newline at end of file +"use strict";(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("titles").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb}else if(nb!==0){printTab(0)}}const levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}const s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){let i1=0,i2=0,a,b,c,c2;const row=levenshtein_row2;while(i1-".indexOf(c)!==-1}function isStopCharacter(c){return isWhitespace(c)||isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){for(let i=0,len=itemTypes.length;i0){throw new Error("Cannot use literal search when there is more than one element")}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw new Error("Unclosed `\"`")}else if(parserState.userQuery[end]!=="\""){throw new Error(`Unexpected \`${parserState.userQuery[end]}\` in a string element`)}else if(start===end){throw new Error("Cannot have empty string element")}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||isWhitespaceCharacter(c)}function isWhitespaceCharacter(c){return c===" "||c==="\t"}function createQueryElement(query,parserState,name,generics,isInGenerics){if(name==="*"||(name.length===0&&generics.length===0)){return}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw new Error("You cannot have more than one element if you use quotes")}const pathSegments=name.split("::");if(pathSegments.length>1){for(let i=0,len=pathSegments.length;i=end){throw new Error("Found generics without a path")}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;while(parserState.pos"){extra="`<`"}else if(endChar===""){extra="`->`"}throw new Error("Unexpected `"+c+"` after "+extra)}if(!foundStopChar){if(endChar!==""){throw new Error(`Expected \`,\`, \` \` or \`${endChar}\`, found \`${c}\``)}throw new Error(`Expected \`,\` or \` \`, found \`${c}\``)}const posBefore=parserState.pos;getNextElem(query,parserState,elems,endChar===">");if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}parserState.pos+=1}function checkExtraTypeFilterCharacters(parserState){const query=parserState.userQuery;for(let pos=0;pos"){if(isReturnArrow(parserState)){break}throw new Error(`Unexpected \`${c}\` (did you mean \`->\`?)`)}throw new Error(`Unexpected \`${c}\``)}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw new Error("Unexpected `:`")}if(query.elems.length===0){throw new Error("Expected type filter before `:`")}else if(query.elems.length!==1||parserState.totalElems!==1){throw new Error("Unexpected `:`")}else if(query.literalSearch){throw new Error("You cannot use quotes on type filter")}checkExtraTypeFilterCharacters(parserState);parserState.typeFilter=query.elems.pop().name;parserState.pos+=1;parserState.totalElems=0;query.literalSearch=false;foundStopChar=true;continue}if(!foundStopChar){if(parserState.typeFilter!==null){throw new Error(`Expected \`,\`, \` \` or \`->\`, found \`${c}\``)}throw new Error(`Expected \`,\`, \` \`, \`:\` or \`->\`, found \`${c}\``)}before=query.elems.length;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}while(parserState.pos`")}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),typeFilter:NO_TYPE_FILTER,elems:[],returned:[],foundElems:0,literalSearch:false,error:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);if(parserState.typeFilter!==null){let typeFilter=parserState.typeFilter;if(typeFilter==="const"){typeFilter="constant"}query.typeFilter=itemTypeFromName(typeFilter)}}catch(err){query=newParsedQuery(userQuery);query.error=err.message;query.typeFilter=-1;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others={},results_in_args={},results_returned={};function transformResults(results){const duplicates={};const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.lev=result.lev;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates[obj.fullPath]){continue}duplicates[obj.fullPath]=true;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const ar=[];for(const entry in results){if(hasOwnPropertyRustdoc(results,entry)){const result=results[entry];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};ar.push(result)}}results=ar;if(results.length===0){return[]}results.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of results){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(results)}function checkGenerics(row,elem,defaultLev){if(row.length<=GENERICS_DATA||row[GENERICS_DATA].length===0){return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}else if(row[GENERICS_DATA].length>0&&row[GENERICS_DATA][0][NAME]===""){if(row.length>GENERICS_DATA){return checkGenerics(row[GENERICS_DATA][0],elem,defaultLev)}return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}let elem_name;if(elem.generics.length>0&&row[GENERICS_DATA].length>=elem.generics.length){const elems=Object.create(null);for(const entry of row[GENERICS_DATA]){elem_name=entry[NAME];if(elem_name===""){if(checkGenerics(entry,elem,MAX_LEV_DISTANCE+1)!==0){return MAX_LEV_DISTANCE+1}continue}if(elems[elem_name]===undefined){elems[elem_name]=0}elems[elem_name]+=1}for(const generic of elem.generics){let match=null;if(elems[generic.name]){match=generic.name}else{for(elem_name in elems){if(!hasOwnPropertyRustdoc(elems,elem_name)){continue}if(elem_name===generic){match=elem_name;break}}}if(match===null){return MAX_LEV_DISTANCE+1}elems[match]-=1;if(elems[match]===0){delete elems[match]}}return 0}return MAX_LEV_DISTANCE+1}function checkIfInGenerics(row,elem){let lev=MAX_LEV_DISTANCE+1;for(const entry of row[GENERICS_DATA]){lev=Math.min(checkType(entry,elem,true),lev);if(lev===0){break}}return lev}function checkType(row,elem,literalSearch){if(row[NAME].length===0){if(row.length>GENERICS_DATA){return checkIfInGenerics(row,elem)}return MAX_LEV_DISTANCE+1}let lev=levenshtein(row[NAME],elem.name);if(literalSearch){if(lev!==0){if(elem.generics.length===0){const checkGeneric=(row.length>GENERICS_DATA&&row[GENERICS_DATA].length>0);if(checkGeneric&&row[GENERICS_DATA].findIndex(tmp_elem=>tmp_elem[NAME]===elem.name)!==-1){return 0}}return MAX_LEV_DISTANCE+1}else if(elem.generics.length>0){return checkGenerics(row,elem,MAX_LEV_DISTANCE+1)}return 0}else if(row.length>GENERICS_DATA){if(elem.generics.length===0){if(lev===0){return 0}lev=checkIfInGenerics(row,elem);return lev+0.5}else if(lev>MAX_LEV_DISTANCE){return checkIfInGenerics(row,elem)}else{const tmp_lev=checkGenerics(row,elem,lev);if(tmp_lev>MAX_LEV_DISTANCE){return MAX_LEV_DISTANCE+1}return(tmp_lev+lev)/2}}else if(elem.generics.length>0){return MAX_LEV_DISTANCE+1}return lev}function findArg(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type[INPUTS_DATA]&&row.type[INPUTS_DATA].length>0){for(const input of row.type[INPUTS_DATA]){if(!typePassesFilter(typeFilter,input[1])){continue}lev=Math.min(lev,checkType(input,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkReturned(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type.length>OUTPUT_DATA){let ret=row.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(const ret_ty of ret){if(!typePassesFilter(typeFilter,ret_ty[1])){continue}lev=Math.min(lev,checkType(ret_ty,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkPath(contains,ty){if(contains.length===0){return 0}let ret_lev=MAX_LEV_DISTANCE+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(let i=0;ilength){break}let lev_total=0;let aborted=false;for(let x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES[filterCrates]&&ALIASES[filterCrates][lowerQuery]){const query_aliases=ALIASES[filterCrates][lowerQuery];for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{Object.keys(ALIASES).forEach(crate=>{if(ALIASES[crate][lowerQuery]){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=ALIASES[crate][lowerQuery];for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}})}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,lev){if(lev===0||(!parsedQuery.literalSearch&&lev<=MAX_LEV_DISTANCE)){if(results[fullId]!==undefined){const result=results[fullId];if(result.dontValidate||result.lev<=lev){return}}results[fullId]={id:id,index:index,dontValidate:parsedQuery.literalSearch,lev:lev,}}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let lev,lev_add=0,index=-1;const fullId=row.id;const in_args=findArg(row,elem,parsedQuery.typeFilter);const returned=checkReturned(row,elem,parsedQuery.typeFilter);addIntoResults(results_in_args,fullId,pos,index,in_args);addIntoResults(results_returned,fullId,pos,index,returned);if(!typePassesFilter(parsedQuery.typeFilter,row.ty)){return}const searchWord=searchWords[pos];if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,-1,0)}return}if(elem.name.length===0){if(row.type!==null){lev=checkGenerics(row.type,elem,MAX_LEV_DISTANCE+1);addIntoResults(results_others,fullId,pos,index,lev)}return}if(elem.fullPath.length>1){lev=checkPath(elem.pathWithoutLast,row);if(lev>MAX_LEV_DISTANCE||(parsedQuery.literalSearch&&lev!==0)){return}else if(lev>0){lev_add=lev/10}}if(searchWord.indexOf(elem.pathLast)>-1||row.normalizedName.indexOf(elem.pathLast)>-1){index=row.normalizedName.indexOf(elem.pathLast)}lev=levenshtein(searchWord,elem.pathLast);if(lev>0&&elem.pathLast.length>2&&searchWord.indexOf(elem.pathLast)>-1){if(elem.pathLast.length<6){lev=1}else{lev=0}}lev+=lev_add;if(lev>MAX_LEV_DISTANCE){return}else if(index!==-1&&elem.fullPath.length<2){lev-=1}if(lev<0){lev=0}addIntoResults(results_others,fullId,pos,index,lev)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let totalLev=0;let nbLev=0;function checkArgs(elems,callback){for(const elem of elems){const lev=callback(row,elem,NO_TYPE_FILTER);if(lev<=1){nbLev+=1;totalLev+=lev}else{return false}}return true}if(!checkArgs(parsedQuery.elems,findArg)){return}if(!checkArgs(parsedQuery.returned,checkReturned)){return}if(nbLev===0){return}const lev=Math.round(totalLev/nbLev);addIntoResults(results,row.id,pos,0,lev)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||levenshtein(name,key)<=MAX_LEV_DISTANCE)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){const h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];length+=1;let extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const wrapper=document.createElement("div");const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);const description=document.createElement("div");description.className="desc";const spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in "}let typeFilter="";if(results.query.typeFilter!==NO_TYPE_FILTER){typeFilter=" (type: "+escape(itemTypes[results.query.typeFilter])+")"}let output="
"+`

Results for ${escape(results.query.userQuery)}`+`${typeFilter}

${crates}
`;if(results.query.error!==null){output+=`

Query parser error: "${results.query.error}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("titles").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function search(e,forced){const params=searchState.getQueryStringParams();const query=parseQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}let filterCrates=getFilterCrates();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";if(browserSupportsHistoryApi()){const newURL=buildUrl(query.original,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];let i,word;let currentIndex=0;let id=0;for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=crateCorpus.q;const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const paths=crateCorpus.p;const aliases=crateCorpus.a;let len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]=Object.create(null);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}for(const local_alias of aliases[alias_name]){ALIASES[crate][alias_name].push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="All crates"){const params=searchState.getQueryStringParams();const query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/doc/settings.css b/doc/settings.css index a76a580..2be35b2 100644 --- a/doc/settings.css +++ b/doc/settings.css @@ -1 +1 @@ -.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.setting-line .radio-line,.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line .setting-name{flex-grow:1;margin-top:auto;margin-bottom:auto;}.setting-line .radio-line input{margin-right:0.3em;}.radio-line .choice{border-radius:0.1em;border:1px solid;margin-left:0.5em;margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file +.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:1px solid;outline:none;-webkit-appearance:none;cursor:pointer;border-radius:50%;}.setting-line .radio-line input+span{padding-bottom:1px;}.radio-line .setting-name{width:100%;}.radio-line .choice{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:flex;align-items:center;cursor:pointer;}.radio-line .choice+.choice{margin-left:0.5em;}.toggle{position:relative;display:inline-block;width:100%;height:27px;margin-right:20px;display:flex;align-items:center;cursor:pointer;}.toggle input{opacity:0;position:absolute;}.slider{position:relative;width:45px;display:block;height:28px;margin-right:20px;cursor:pointer;background-color:#ccc;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;transition:.3s;}input:checked+.slider:before{transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;}div#settings{position:absolute;right:0;z-index:1;display:block;margin-top:7px;border-radius:3px;border:1px solid;}#settings .setting-line{margin:1.2em 0.6em;}div#settings::before{content:'';position:absolute;right:11px;border:solid;border-width:1px 1px 0 0;display:inline-block;padding:4px;transform:rotate(-45deg);top:-5px;} \ No newline at end of file diff --git a/doc/settings.html b/doc/settings.html index b0eb6e1..8c7b350 100644 --- a/doc/settings.html +++ b/doc/settings.html @@ -1,7 +1,8 @@ -Rustdoc settings -

Rustdoc settings

Back
\ No newline at end of file diff --git a/doc/settings.js b/doc/settings.js index a68768c..35d65a9 100644 --- a/doc/settings.js +++ b/doc/settings.js @@ -3,17 +3,9 @@
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";output+=``});output+="
"}else{const checked=setting["default"]===true?" checked":"";output+=` - -
${setting_name}
`}output+=""}return output}function buildSettingsPage(){const themes=getVar("themes").split(",");const settings=[{"name":"Use system theme","js_name":"use-system-theme","default":true,},{"name":"Theme","js_name":"theme","default":"light","options":themes,},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":themes,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":themes,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const el=document.createElement("section");el.id="settings";let innerHTML=` -
-

- Rustdoc settings -

- `;if(isSettingsPage){innerHTML+="Back"}else{innerHTML+="Back"}innerHTML+=` -
-
${buildSettingsPageSections(settings)}
`;el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{getNotDisplayedElem().appendChild(el)}return el}const settingsMenu=buildSettingsPage();if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();settingsButton.onclick=function(event){event.preventDefault();if(settingsMenu.parentElement.id===NOT_DISPLAYED_ID){switchDisplayedElement(settingsMenu)}else{window.hideSettings()}};window.hideSettings=function(){switchDisplayedElement(null)}}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){switchDisplayedElement(settingsMenu)}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file + ${option}\ + `});output+=""}else{const checked=setting["default"]===true?" checked":"";output+=``}output+=""}return output}function buildSettingsPage(){const themes=getVar("themes").split(",");const settings=[{"name":"Use system theme","js_name":"use-system-theme","default":true,},{"name":"Theme","js_name":"theme","default":"light","options":themes,},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":themes,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":themes,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event){const settingsButton=getSettingsButton();if(!elemIsInParent(document.activeElement,settingsButton)&&!elemIsInParent(event.relatedTarget,settingsButton)){window.hideSettings()}}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");window.hideSettings=function(){settingsMenu.style.display="none"};settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();if(settingsMenu.style.display!=="none"){window.hideSettings()}else{displaySettings()}};settingsButton.onblur=blurHandler;settingsButton.querySelector("a").onblur=blurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=blurHandler});settingsMenu.onblur=blurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/doc/source-script.js b/doc/source-script.js index 96e6c42..c885670 100644 --- a/doc/source-script.js +++ b/doc/source-script.js @@ -1 +1 @@ -"use strict";(function(){function getCurrentFilePath(){const parts=window.location.pathname.split("/");const rootPathParts=window.rootPath.split("/");for(const rootPathPart of rootPathParts){if(rootPathPart===".."){parts.pop()}}let file=window.location.pathname.substring(parts.join("/").length);if(file.startsWith("/")){file=file.substring(1)}return file.substring(0,file.length-5)}function createDirEntry(elem,parent,fullPath,currentFile,hasFoundFile){const name=document.createElement("div");name.className="name";fullPath+=elem["name"]+"/";name.onclick=()=>{if(hasClass(this,"expand")){removeClass(this,"expand")}else{addClass(this,"expand")}};name.innerText=elem["name"];const children=document.createElement("div");children.className="children";const folders=document.createElement("div");folders.className="folders";if(elem.dirs){for(const dir of elem.dirs){if(createDirEntry(dir,folders,fullPath,currentFile,hasFoundFile)){addClass(name,"expand");hasFoundFile=true}}}children.appendChild(folders);const files=document.createElement("div");files.className="files";if(elem.files){for(const file_text of elem.files){const file=document.createElement("a");file.innerText=file_text;file.href=window.rootPath+"src/"+fullPath+file_text+".html";if(!hasFoundFile&¤tFile===fullPath+file_text){file.className="selected";addClass(name,"expand");hasFoundFile=true}files.appendChild(file)}}children.appendChild(files);parent.appendChild(name);parent.appendChild(children);return hasFoundFile&¤tFile.startsWith(fullPath)}function toggleSidebar(){const sidebar=document.querySelector("nav.sidebar");const child=this.children[0];if(child.innerText===">"){sidebar.classList.add("expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{sidebar.classList.remove("expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;const inner=document.createElement("div");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("source-sidebar-show")!=="true"){container.classList.remove("expanded")}else{container.classList.add("expanded")}const currentFile=getCurrentFilePath();let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("span"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file +"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;function createDirEntry(elem,parent,fullPath,hasFoundFile){const name=document.createElement("div");name.className="name";fullPath+=elem["name"]+"/";name.onclick=ev=>{if(hasClass(ev.target,"expand")){removeClass(ev.target,"expand")}else{addClass(ev.target,"expand")}};name.innerText=elem["name"];const children=document.createElement("div");children.className="children";const folders=document.createElement("div");folders.className="folders";if(elem.dirs){for(const dir of elem.dirs){if(createDirEntry(dir,folders,fullPath,hasFoundFile)){addClass(name,"expand");hasFoundFile=true}}}children.appendChild(folders);const files=document.createElement("div");files.className="files";if(elem.files){for(const file_text of elem.files){const file=document.createElement("a");file.innerText=file_text;file.href=rootPath+"src/"+fullPath+file_text+".html";const w=window.location.href.split("#")[0];if(!hasFoundFile&&w===file.href){file.className="selected";addClass(name,"expand");hasFoundFile=true}files.appendChild(file)}}children.appendChild(files);parent.appendChild(name);parent.appendChild(children);return hasFoundFile}function toggleSidebar(){const child=this.children[0];if(child.innerText===">"){addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;const inner=document.createElement("div");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("span"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/doc/src/draught/board/enums.rs.html b/doc/src/draught/board/enums.rs.html index 0814165..a93a7b2 100644 --- a/doc/src/draught/board/enums.rs.html +++ b/doc/src/draught/board/enums.rs.html @@ -1,9 +1,10 @@ -enums.rs - source -
1
 2
 3
 4
@@ -175,5 +176,5 @@
     NoJumpablePiece = 7,
     JumpingSameTeam = 8,
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/board/iter.rs.html b/doc/src/draught/board/iter.rs.html index 6f5ec94..1db786f 100644 --- a/doc/src/draught/board/iter.rs.html +++ b/doc/src/draught/board/iter.rs.html @@ -1,9 +1,10 @@ -iter.rs - source -
1
 2
 3
 4
@@ -393,5 +394,5 @@
     }
 
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/board/mod.rs.html b/doc/src/draught/board/mod.rs.html index f724510..7182a0a 100644 --- a/doc/src/draught/board/mod.rs.html +++ b/doc/src/draught/board/mod.rs.html @@ -1,9 +1,10 @@ -mod.rs - source -
1
 2
 3
 4
@@ -1703,5 +1704,5 @@
         write!(f, "{}", string)
     }
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/comp/mod.rs.html b/doc/src/draught/comp/mod.rs.html index 712db4b..46e10f7 100644 --- a/doc/src/draught/comp/mod.rs.html +++ b/doc/src/draught/comp/mod.rs.html @@ -1,9 +1,10 @@ -mod.rs - source -
1
 2
 3
 4
@@ -863,5 +864,5 @@
             .clone()
     }
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/game/mod.rs.html b/doc/src/draught/game/mod.rs.html index de5bc7a..4f2a849 100644 --- a/doc/src/draught/game/mod.rs.html +++ b/doc/src/draught/game/mod.rs.html @@ -1,9 +1,10 @@ -mod.rs - source -
1
 2
 3
 4
@@ -506,5 +507,5 @@
     }
 }
 
-
+
\ No newline at end of file diff --git a/doc/src/draught/lib.rs.html b/doc/src/draught/lib.rs.html index 1a4cc86..2d4b6ed 100644 --- a/doc/src/draught/lib.rs.html +++ b/doc/src/draught/lib.rs.html @@ -1,9 +1,10 @@ -lib.rs - source -
1
 2
 3
 4
@@ -40,12 +41,6 @@
 35
 36
 37
-38
-39
-40
-41
-42
-43
 
//! Draught
 //! 
 //! An implementation of checkers/draughts in Rust WebAssembly with a minimax AI player
@@ -64,12 +59,6 @@
 pub use comp::Computer;
 pub use paint::Painter;
 
-// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
-// allocator.
-#[cfg(feature = "wee_alloc")]
-#[global_allocator]
-static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
-
 /// Wrap the [`web_sys`] access to the browser console in a macro for easy logging
 #[macro_export]
 macro_rules! log {
@@ -89,5 +78,5 @@
     log!("Initialising WebAssembly");
     utils::set_panic_hook();
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/paint.rs.html b/doc/src/draught/paint.rs.html index 77c8d58..5792a3f 100644 --- a/doc/src/draught/paint.rs.html +++ b/doc/src/draught/paint.rs.html @@ -1,9 +1,10 @@ -paint.rs - source -
1
 2
 3
 4
@@ -785,5 +786,5 @@
         }
     }
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/utils.rs.html b/doc/src/draught/utils.rs.html index 33113d6..2f88d01 100644 --- a/doc/src/draught/utils.rs.html +++ b/doc/src/draught/utils.rs.html @@ -1,9 +1,10 @@ -utils.rs - source -
1
 2
 3
 4
@@ -24,5 +25,5 @@
     console_error_panic_hook::set_once();
 }
 
-
+
\ No newline at end of file diff --git a/doc/storage.js b/doc/storage.js index a0eef58..ad14b2a 100644 --- a/doc/storage.js +++ b/doc/storage.js @@ -1 +1 @@ -"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}const dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current!==null){return current}if(settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return null}const localStoredTheme=getSettingValue("theme");const savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){if(reversed){const length=arr.length;for(let i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){const newHref=mainStyleElem.href.replace(/\/rustdoc([^/]*)\.css/,"/"+newTheme+"$1"+".css");if(saveTheme){updateLocalStorage("theme",newTheme)}if(styleElem.href===newHref){return}let found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),el=>{savedHref.push(el.href)})}onEach(savedHref,el=>{if(el===newHref){found=true;return true}});if(found){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("use-system-theme",value);const toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}const updateSystemTheme=(function(){if(!window.matchMedia){return()=>{const cssTheme=getComputedStyle(document.documentElement).getPropertyValue("content");switchTheme(window.currentTheme,window.mainTheme,JSON.parse(cssTheme)||"light",true)}}const mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){const use=theme=>{switchTheme(window.currentTheme,window.mainTheme,theme,true)};if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){use(darkTheme)}else{use(lightTheme)}}else{use(getSettingValue("theme"))}}mql.addListener(handlePreferenceChange);return()=>{handlePreferenceChange(mql)}})();function switchToSavedTheme(){switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)}if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchToSavedTheme()}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(switchToSavedTheme,0)}}) \ No newline at end of file +"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}const dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current!==null){return current}if(settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return null}const localStoredTheme=getSettingValue("theme");const savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){if(reversed){const length=arr.length;for(let i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){const newHref=mainStyleElem.href.replace(/\/rustdoc([^/]*)\.css/,"/"+newTheme+"$1"+".css");if(saveTheme){updateLocalStorage("theme",newTheme)}if(styleElem.href===newHref){return}let found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),el=>{savedHref.push(el.href)})}onEach(savedHref,el=>{if(el===newHref){found=true;return true}});if(found){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("use-system-theme",value);const toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}const updateSystemTheme=(function(){if(!window.matchMedia){return()=>{const cssTheme=getComputedStyle(document.documentElement).getPropertyValue("content");switchTheme(window.currentTheme,window.mainTheme,JSON.parse(cssTheme)||"light",true)}}const mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){const use=theme=>{switchTheme(window.currentTheme,window.mainTheme,theme,true)};if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){use(darkTheme)}else{use(lightTheme)}}else{use(getSettingValue("theme"))}}mql.addListener(handlePreferenceChange);return()=>{handlePreferenceChange(mql)}})();function switchToSavedTheme(){switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)}if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchToSavedTheme()}if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(switchToSavedTheme,0)}}) \ No newline at end of file