diff --git a/10.bootstrap.js b/10.bootstrap.js index 5393613..9c4327e 100644 --- a/10.bootstrap.js +++ b/10.bootstrap.js @@ -1,2 +1,2 @@ -(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(t,e,r)=>{"use strict";r.a(t,(async n=>{r.d(e,{wc:()=>x,SZ:()=>O,i0:()=>S,Tt:()=>I,rh:()=>E,lA:()=>B,Ck:()=>q,ug:()=>U,h4:()=>W,Ih:()=>R,yq:()=>Z,gk:()=>$,Os:()=>Y,ae:()=>M,U5:()=>D,iY:()=>z,mS:()=>J,XP:()=>P,K0:()=>F,yX:()=>G,DA:()=>L,xA:()=>N,p$:()=>H,zG:()=>X,q5:()=>K,r2:()=>V,pv:()=>Q,cF:()=>tt,N_:()=>et,S2:()=>rt,on:()=>nt,CZ:()=>_t,Ox:()=>at,kP:()=>ct,GR:()=>ot,Yl:()=>it,CU:()=>st,RA:()=>ut,Si:()=>lt,c7:()=>pt,bf:()=>dt,Z4:()=>gt,tL:()=>bt,Qu:()=>ht,EB:()=>ft,Yc:()=>wt,rf:()=>mt,Ts:()=>vt,Mz:()=>yt,Zu:()=>kt,_G:()=>xt,kC:()=>Tt,m_:()=>Ot,fY:()=>St,Or:()=>It,oH:()=>jt});var _=r(813);t=r.hmd(t);var a=n([_]);_=(a.then?await a:a)[0];const c=new Array(32).fill(void 0);function o(t){return c[t]}c.push(void 0,null,!0,!1);let i=c.length;let s=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});s.decode();let u=null;function l(){return null!==u&&u.buffer===_.memory.buffer||(u=new Uint8Array(_.memory.buffer)),u}function p(t,e){return s.decode(l().subarray(t,t+e))}function d(t){i===c.length&&c.push(c.length+1);const e=i;return i=c[e],c[e]=t,e}function g(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+=g(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 b=0,h=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const f="function"==typeof h.encodeInto?function(t,e){return h.encodeInto(t,e)}:function(t,e){const r=h.encode(t);return e.set(r),{read:t.length,written:r.length}};function w(t,e,r){if(void 0===r){const r=h.encode(t),n=e(r.length);return l().subarray(n,n+r.length).set(r),b=r.length,n}let n=t.length,_=e(n);const a=l();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=l().subarray(_+c,_+n);c+=f(t,e).written}return b=c,_}let m=null;function v(){return null!==m&&m.buffer===_.memory.buffer||(m=new Int32Array(_.memory.buffer)),m}function y(t){return null==t}function k(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function x(){_.init_wasm()}function T(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(d(t))}}Object.freeze({Move:0,0:"Move",Jump:1,1:"Jump"});const O=Object.freeze({Black:0,0:"Black",White:1,1:"White"}),S=(Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"})),I=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 j{static __wrap(t){const e=Object.create(j.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();_.__wbg_board_free(t)}get width(){return _.__wbg_get_board_width(this.ptr)>>>0}set width(t){_.__wbg_set_board_width(this.ptr,t)}get height(){return _.__wbg_get_board_height(this.ptr)>>>0}set height(t){_.__wbg_set_board_height(this.ptr,t)}get current_turn(){return _.__wbg_get_board_current_turn(this.ptr)>>>0}set current_turn(t){_.__wbg_set_board_current_turn(this.ptr,t)}cell(t){var e=_.board_cell(this.ptr,t);return A.__wrap(e)}set_cell(t,e){k(e,A);var r=e.ptr;e.ptr=0,_.board_set_cell(this.ptr,t,r)}grid_cell(t){k(t,E);var e=t.ptr;t.ptr=0;var r=_.board_grid_cell(this.ptr,e);return A.__wrap(r)}cell_index(t,e){return _.board_cell_index(this.ptr,t,e)>>>0}cell_idx(t){k(t,E);var e=t.ptr;return t.ptr=0,_.board_cell_idx(this.ptr,e)>>>0}board_index(t){var e=_.board_board_index(this.ptr,t);return E.__wrap(e)}can_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;return e.ptr=0,_.board_can_move(this.ptr,r,n)>>>0}validate_man_move(t,e,r){k(t,E);var n=t.ptr;t.ptr=0,k(e,E);var a=e.ptr;e.ptr=0,k(r,C);var c=r.ptr;return r.ptr=0,_.board_validate_man_move(this.ptr,n,a,c)>>>0}validate_king_move(t,e,r){k(t,E);var n=t.ptr;t.ptr=0,k(e,E);var a=e.ptr;e.ptr=0,k(r,C);var c=r.ptr;return r.ptr=0,_.board_validate_king_move(this.ptr,n,a,c)>>>0}jumpee_idx(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;return e.ptr=0,_.board_jumpee_idx(this.ptr,r,n)>>>0}cells(){return _.board_cells(this.ptr)}num_cells(){return _.board_num_cells(this.ptr)>>>0}num_pieces(){return _.board_num_pieces(this.ptr)>>>0}num_player(t){return _.board_num_player(this.ptr,t)>>>0}score(){return _.board_score(this.ptr)}cell_state(t){return _.board_cell_state(this.ptr,t)>>>0}apply_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0;var a=_.board_apply_move(this.ptr,r,n);return j.__wrap(a)}apply_jump(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0;var a=_.board_apply_jump(this.ptr,r,n);return j.__wrap(a)}king_row_idx(){return _.board_king_row_idx(this.ptr)>>>0}static validate_jumpee(t,e){k(t,A);var r=t.ptr;t.ptr=0,k(e,C);var n=e.ptr;return e.ptr=0,_.board_validate_jumpee(r,n)>>>0}static check_jumpee_team(t,e){k(t,C);var r=t.ptr;t.ptr=0,k(e,C);var n=e.ptr;return e.ptr=0,0!==_.board_check_jumpee_team(r,n)}constructor(t,e,r){var n=_.board_new(t,e,r);return j.__wrap(n)}static init_game(t,e){k(t,j);var r=t.ptr;t.ptr=0;var n=_.board_init_game(r,e);return j.__wrap(n)}}class E{static __wrap(t){const e=Object.create(E.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();_.__wbg_brdidx_free(t)}get row(){return _.__wbg_get_brdidx_row(this.ptr)>>>0}set row(t){_.__wbg_set_brdidx_row(this.ptr,t)}get col(){return _.__wbg_get_brdidx_col(this.ptr)>>>0}set col(t){_.__wbg_set_brdidx_col(this.ptr,t)}constructor(t,e){var r=_.brdidx_from(t,e);return E.__wrap(r)}eq(t){return k(t,E),0!==_.brdidx_eq(this.ptr,t.ptr)}}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();_.__wbg_game_free(t)}get last_node_count(){return _.__wbg_get_game_last_node_count(this.ptr)>>>0}set last_node_count(t){_.__wbg_set_game_last_node_count(this.ptr,t)}get perfect_chance(){return _.__wbg_get_game_perfect_chance(this.ptr)}set perfect_chance(t){_.__wbg_set_game_perfect_chance(this.ptr,t)}current_board_cells(){return _.game_current_board_cells(this.ptr)}current_board_len(){return _.game_current_board_len(this.ptr)>>>0}current_turn(){return _.game_current_turn(this.ptr)>>>0}score(){return _.game_score(this.ptr)}winning(){var t=_.game_winning(this.ptr);return 2===t?void 0:t}has_won(){var t=_.game_has_won(this.ptr);return 2===t?void 0:t}current_cell_state(t){k(t,E);var e=_.game_current_cell_state(this.ptr,t.ptr);return A.__wrap(e)}set_search_depth(t){_.game_set_search_depth(this.ptr,t)}set_selected(t){k(t,E),_.game_set_selected(this.ptr,t.ptr)}set_perfect_chance(t){_.game_set_perfect_chance(this.ptr,t)}clear_selected(){_.game_clear_selected(this.ptr)}make_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;return e.ptr=0,_.game_make_move(this.ptr,r,n)>>>0}execute_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0,_.game_execute_move(this.ptr,r,n)}execute_jump(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0,_.game_execute_jump(this.ptr,r,n)}push_new_board(t){k(t,j);var e=t.ptr;t.ptr=0,_.game_push_new_board(this.ptr,e)}set_current(t){k(t,j);var e=t.ptr;t.ptr=0,_.game_set_current(this.ptr,e)}constructor(t,e,r,n,a){var c=_.game_new(t,e,r,n,a);return B.__wrap(c)}static new_with_canvas(t,e,r,n,a,c,o,i){var s=w(c,_.__wbindgen_malloc,_.__wbindgen_realloc),u=b,l=_.game_new_with_canvas(t,e,r,n,a,s,u,o,i);return B.__wrap(l)}set_painter(t){k(t,q);var e=t.ptr;t.ptr=0,_.game_set_painter(this.ptr,e)}draw(){_.game_draw(this.ptr)}ai_move(){_.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();_.__wbg_painter_free(t)}constructor(t,e,r){var n=w(r,_.__wbindgen_malloc,_.__wbindgen_realloc),a=b,c=_.painter_new(t,e,n,a);return q.__wrap(c)}static new_with_canvas(t,e,r){var n=_.painter_new_with_canvas(t,e,d(r));return q.__wrap(n)}set_square_outline(t){_.painter_set_square_outline(this.ptr,d(t))}set_outline_width(t){_.painter_set_outline_width(this.ptr,t)}set_draw_outline(t){_.painter_set_draw_outline(this.ptr,t)}reset_dimensions(){_.painter_reset_dimensions(this.ptr)}validate_board_dim(t){return k(t,j),0!==_.painter_validate_board_dim(this.ptr,t.ptr)}draw(t){k(t,j),_.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();_.__wbg_piece_free(t)}get team(){return _.__wbg_get_piece_team(this.ptr)>>>0}set team(t){_.__wbg_set_piece_team(this.ptr,t)}get strength(){return _.__wbg_get_piece_strength(this.ptr)>>>0}set strength(t){_.__wbg_set_piece_strength(this.ptr,t)}constructor(t,e){var r=_.piece_new(t,e);return C.__wrap(r)}}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();_.__wbg_square_free(t)}get occupant(){var t=_.__wbg_get_square_occupant(this.ptr);return 0===t?void 0:C.__wrap(t)}set occupant(t){let e=0;y(t)||(k(t,C),e=t.ptr,t.ptr=0),_.__wbg_set_square_occupant(this.ptr,e)}get state(){return _.__wbg_get_square_state(this.ptr)>>>0}set state(t){_.__wbg_set_square_state(this.ptr,t)}constructor(t,e){let r=0;y(e)||(k(e,C),r=e.ptr,e.ptr=0);var n=_.square_new(t,r);return A.__wrap(n)}static pc(t,e){var r=_.square_pc(t,e);return A.__wrap(r)}static empty(){var t=_.square_empty();return A.__wrap(t)}static unplay(){var t=_.square_unplay();return A.__wrap(t)}}function U(t){!function(t){const e=o(t);(function(t){t<36||(c[t]=i,i=t)})(t)}(t)}function W(t,e){return d(p(t,e))}function R(){return d(new Error)}function Z(t,e){var r=w(o(e).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),n=b;v()[t/4+1]=n,v()[t/4+0]=r}function $(t,e){try{console.error(p(t,e))}finally{_.__wbindgen_free(t,e)}}function Y(t,e,r){var n,_;o(t).randomFillSync((n=e,_=r,l().subarray(n/1,n/1+_)))}function M(t,e){o(t).getRandomValues(o(e))}function D(){return T((function(){return d(self.self)}),arguments)}function z(t){return d(o(t).crypto)}function J(t){return d(o(t).msCrypto)}function P(t){return void 0===o(t)}function F(t,e,r){return d(o(t).require(p(e,r)))}function G(t){return d(o(t).getRandomValues)}function L(){return d(t)}function N(t){return o(t)instanceof Window}function H(t){var e=o(t).document;return y(e)?0:d(e)}function X(t,e,r){var n=o(t).getElementById(p(e,r));return y(n)?0:d(n)}function K(t){console.error(o(t))}function V(t){console.log(o(t))}function Q(t){return o(t)instanceof CanvasRenderingContext2D}function tt(t,e){o(t).strokeStyle=o(e)}function et(t,e){o(t).fillStyle=o(e)}function rt(t,e){o(t).lineWidth=e}function nt(t){o(t).beginPath()}function _t(t){o(t).fill()}function at(t){o(t).stroke()}function ct(){return T((function(t,e,r,n,_,a){o(t).arc(e,r,n,_,a)}),arguments)}function ot(t,e,r,n,_){o(t).fillRect(e,r,n,_)}function it(t,e,r,n,_){o(t).strokeRect(e,r,n,_)}function st(t){return o(t)instanceof HTMLCanvasElement}function ut(t,e){o(t).width=e>>>0}function lt(t,e){o(t).height=e>>>0}function pt(){return T((function(t,e,r){var n=o(t).getContext(p(e,r));return y(n)?0:d(n)}),arguments)}function dt(t,e){return d(new Function(p(t,e)))}function gt(){return T((function(t,e){return d(o(t).call(o(e)))}),arguments)}function bt(){return T((function(){return d(self.self)}),arguments)}function ht(){return T((function(){return d(window.window)}),arguments)}function ft(){return T((function(){return d(globalThis.globalThis)}),arguments)}function wt(){return T((function(){return d(r.g.global)}),arguments)}function mt(t){return d(o(t).buffer)}function vt(t){return d(new Uint8Array(o(t)))}function yt(t,e,r){o(t).set(o(e),r>>>0)}function kt(t){return o(t).length}function xt(t){return d(new Uint8Array(t>>>0))}function Tt(t,e,r){return d(o(t).subarray(e>>>0,r>>>0))}function Ot(t){return d(o(t))}function St(t,e){var r=w(g(o(e)),_.__wbindgen_malloc,_.__wbindgen_realloc),n=b;v()[t/4+1]=n,v()[t/4+0]=r}function It(t,e){throw new Error(p(t,e))}function jt(){return d(_.memory)}}))},813:(t,e,r)=>{"use strict";var n=([n])=>r.v(e,t.id,"5834d1c20fa287719232",{"./draught_bg.js":{__wbindgen_object_drop_ref:n.ug,__wbindgen_string_new:n.h4,__wbg_new_693216e109162396:n.Ih,__wbg_stack_0ddaca5d1abfb52f:n.yq,__wbg_error_09919627ac0992f5:n.gk,__wbg_randomFillSync_d2ba53160aec6aba:n.Os,__wbg_getRandomValues_e57c9b75ddead065:n.ae,__wbg_self_86b4b13392c7af56:n.U5,__wbg_crypto_b8c92eaac23d0d80:n.iY,__wbg_msCrypto_9ad6677321a08dd8:n.mS,__wbindgen_is_undefined:n.XP,__wbg_require_f5521a5b85ad2542:n.K0,__wbg_getRandomValues_dd27e6b0652b3236:n.yX,__wbg_static_accessor_MODULE_452b4680e8614c81:n.DA,__wbg_instanceof_Window_434ce1849eb4e0fc:n.xA,__wbg_document_5edd43643d1060d9:n.p$,__wbg_getElementById_b30e88aff96f66a1:n.zG,__wbg_error_ca520cb687b085a1:n.q5,__wbg_log_fbd13631356d44e4:n.r2,__wbg_instanceof_CanvasRenderingContext2d_e8b3a478a1b32d55:n.pv,__wbg_setstrokeStyle_4c9ff9ea0c0c4092:n.cF,__wbg_setfillStyle_680401a47926faa5:n.N_,__wbg_setlineWidth_4819b1bc5c54719b:n.S2,__wbg_beginPath_5a6fcb370b5b8eb3:n.on,__wbg_fill_0ced47ff22561640:n.CZ,__wbg_stroke_46c6315e5e1f35db:n.Ox,__wbg_arc_b3cb1027882c81bb:n.kP,__wbg_fillRect_7ad775936c1881ce:n.GR,__wbg_strokeRect_a3f2f571f1ad9730:n.Yl,__wbg_instanceof_HtmlCanvasElement_a6157e470d06b638:n.CU,__wbg_setwidth_362e8db8cbadbe96:n.RA,__wbg_setheight_28f53831182cc410:n.Si,__wbg_getContext_bd4e9445094eda84:n.c7,__wbg_newnoargs_f579424187aa1717:n.bf,__wbg_call_89558c3e96703ca1:n.Z4,__wbg_self_e23d74ae45fb17d1:n.tL,__wbg_window_b4be7f48b24ac56e:n.Qu,__wbg_globalThis_d61b1f48a57191ae:n.EB,__wbg_global_e7669da72fd7f239:n.Yc,__wbg_buffer_5e74a88a1424a2e0:n.rf,__wbg_new_e3b800e570795b3c:n.Ts,__wbg_set_5b8081e9d002f0df:n.Mz,__wbg_length_30803400a8f15c59:n.Zu,__wbg_newwithlength_5f4ce114a24dfe1e:n._G,__wbg_subarray_a68f835ca2af506f:n.kC,__wbindgen_object_clone_ref:n.m_,__wbindgen_debug_string:n.fY,__wbindgen_throw:n.Or,__wbindgen_memory:n.oH}});r.a(t,(t=>{var e=t([r(171)]);return e.then?e.then(n):n(e)}),1)},10:(t,e,r)=>{"use strict";r.a(t,(async t=>{r.r(e);var n=r(171),_=t([n]);n=(_.then?await _:_)[0];var a=8,c=8,o=3,i=4,s=.5;const u="human_turn.thinking",l="human_turn.from_selected";(0,n.wc)(),document.getElementById("status-p");const p=document.getElementById("status-d"),d=document.getElementById("team-p"),g=document.getElementById("node-count"),b=document.getElementById("winning-p");document.getElementById("startBtn").onclick=T;let h=null,f=null,w=function(t,e="danger",r=!0){null!=f&&clearInterval(f),p.className=`alert alert-${e}`,p.innerText=t,p.hidden=!1,r&&(f=setTimeout((()=>{p.hidden=!0}),3e3))},m=u,v=null,y=null,k=[];T();const x=document.getElementById("game-canvas");function T(){v=new n.lA(a,c,o,n.SZ.Black,i),y=new n.Ck(720,720,"game-canvas"),v.set_painter(y),v.draw(),clearInterval(h),O(),S(),k=[],m=u}function O(){switch(v.current_turn()){case n.SZ.White:d.innerText="⚪ White ⚪";break;case n.SZ.Black:d.innerText="🔴 Black 🔴"}}function S(){switch(v.winning()){case void 0:b.innerText="";break;case n.SZ.White:b.innerText="👑 White 👑";break;case n.SZ.Black:b.innerText="👑 Black 👑"}}x.addEventListener("click",(t=>{var e=function(t,e){var r=t.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(x,t);!function(t){switch(m){case u:if(v.current_cell_state(t).state!=n.i0.Occupied)return;if(v.current_cell_state(t).occupant.team!=v.current_turn())return;k.push(t),m=l,v.set_selected(t),v.draw();break;case l:if(!k[0].eq(t)){if(v.current_cell_state(t).state!=n.i0.Empty)return;if(k.push(t),2!=k.length)return w(`Error: wrong number of clicks to process ${k.length}`),void console.error(`Error: wrong number of clicks to process ${k.length}`);switch(v.make_move(k[0],k[1])){case n.Tt.Allowed:q.checked&&void 0===v.has_won()&&(v.ai_move(),g.innerText=`searched ${v.last_node_count.toLocaleString("en-GB")} possible moves`);break;case n.Tt.IllegalTrajectory:w("You can't move like that!");break;case n.Tt.JumpingSameTeam:w("You can't jump your own piece!");break;case n.Tt.NoJumpablePiece:w("There's nothing to jump!");break;case n.Tt.OccupiedDest:w("There's a piece there!");break;case n.Tt.OutOfBounds:w("That square's not on the board! (how have you managed that?)");break;case n.Tt.UnoccupiedSrc:w("There's no piece to move!");break;case n.Tt.Unplayable:w("That's not a playable square!");break;case n.Tt.WrongTeamSrc:w("That's not your piece!")}}v.clear_selected(),v.draw(),k=[],m=u;break;case"ai_turn":console.log("It's the AI's turn!")}O(),S(),function(){switch(v.has_won()){case void 0:break;case n.SZ.White:w("You Lost!"),h=setInterval((()=>{T()}),3e3);break;case n.SZ.Black:w("You Won!","success"),h=setInterval((()=>{T()}),3e3)}}()}(new n.rh(Math.floor(e.y/x.clientHeight*c),Math.floor(e.x/x.clientWidth*a)))}));const I=document.getElementById("width");I.onchange=()=>{a=parseInt(I.value),T()},I.value=8;const j=document.getElementById("height");j.onchange=()=>{c=parseInt(j.value),E.max=c/2-1,T()},j.value=8;const E=document.getElementById("play_rows");E.onchange=()=>{o=parseInt(E.value),T()},E.value=3;const B=document.getElementById("ai_search_depth");B.onchange=()=>{i=parseInt(B.value),v.set_search_depth(i),i>4&&w("This increases thinking time exponentially, be careful (probably don't go past 6)","warning")},B.value=4;const q=document.getElementById("ai-checkbox");q.onchange=()=>{};const C=document.getElementById("ai_difficulty");C.onchange=()=>{s=parseInt(C.value)/100,v.set_perfect_chance(s)},C.value=50}))}}]); +(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(t,e,r)=>{"use strict";r.a(t,(async n=>{r.d(e,{wc:()=>x,SZ:()=>O,i0:()=>S,Tt:()=>I,rh:()=>E,lA:()=>B,Ck:()=>q,ug:()=>U,h4:()=>W,Ih:()=>R,yq:()=>Z,gk:()=>$,U5:()=>Y,iY:()=>M,mS:()=>D,XP:()=>z,K0:()=>J,yX:()=>P,ae:()=>F,Os:()=>G,DA:()=>L,xA:()=>N,p$:()=>H,zG:()=>X,q5:()=>K,r2:()=>V,pv:()=>Q,cF:()=>tt,N_:()=>et,S2:()=>rt,on:()=>nt,CZ:()=>_t,Ox:()=>at,kP:()=>ct,GR:()=>ot,Yl:()=>it,CU:()=>st,RA:()=>ut,Si:()=>lt,c7:()=>pt,bf:()=>dt,Z4:()=>bt,tL:()=>gt,Qu:()=>ht,EB:()=>ft,Yc:()=>wt,rf:()=>mt,Ts:()=>vt,Mz:()=>yt,Zu:()=>kt,_G:()=>xt,kC:()=>Tt,m_:()=>Ot,fY:()=>St,Or:()=>It,oH:()=>jt});var _=r(813);t=r.hmd(t);var a=n([_]);_=(a.then?await a:a)[0];const c=new Array(32).fill(void 0);function o(t){return c[t]}c.push(void 0,null,!0,!1);let i=c.length;let s=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});s.decode();let u=null;function l(){return null!==u&&u.buffer===_.memory.buffer||(u=new Uint8Array(_.memory.buffer)),u}function p(t,e){return s.decode(l().subarray(t,t+e))}function d(t){i===c.length&&c.push(c.length+1);const e=i;return i=c[e],c[e]=t,e}function b(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+=b(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 g=0,h=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const f="function"==typeof h.encodeInto?function(t,e){return h.encodeInto(t,e)}:function(t,e){const r=h.encode(t);return e.set(r),{read:t.length,written:r.length}};function w(t,e,r){if(void 0===r){const r=h.encode(t),n=e(r.length);return l().subarray(n,n+r.length).set(r),g=r.length,n}let n=t.length,_=e(n);const a=l();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=l().subarray(_+c,_+n);c+=f(t,e).written}return g=c,_}let m=null;function v(){return null!==m&&m.buffer===_.memory.buffer||(m=new Int32Array(_.memory.buffer)),m}function y(t){return null==t}function k(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function x(){_.init_wasm()}function T(t,e){try{return t.apply(this,e)}catch(t){_.__wbindgen_exn_store(d(t))}}Object.freeze({Move:0,0:"Move",Jump:1,1:"Jump"});const O=Object.freeze({Black:0,0:"Black",White:1,1:"White"}),S=(Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"})),I=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 j{static __wrap(t){const e=Object.create(j.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();_.__wbg_board_free(t)}get width(){return _.__wbg_get_board_width(this.ptr)>>>0}set width(t){_.__wbg_set_board_width(this.ptr,t)}get height(){return _.__wbg_get_board_height(this.ptr)>>>0}set height(t){_.__wbg_set_board_height(this.ptr,t)}get current_turn(){return _.__wbg_get_board_current_turn(this.ptr)>>>0}set current_turn(t){_.__wbg_set_board_current_turn(this.ptr,t)}cell(t){var e=_.board_cell(this.ptr,t);return A.__wrap(e)}set_cell(t,e){k(e,A);var r=e.ptr;e.ptr=0,_.board_set_cell(this.ptr,t,r)}grid_cell(t){k(t,E);var e=t.ptr;t.ptr=0;var r=_.board_grid_cell(this.ptr,e);return A.__wrap(r)}cell_index(t,e){return _.board_cell_index(this.ptr,t,e)>>>0}cell_idx(t){k(t,E);var e=t.ptr;return t.ptr=0,_.board_cell_idx(this.ptr,e)>>>0}board_index(t){var e=_.board_board_index(this.ptr,t);return E.__wrap(e)}can_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;return e.ptr=0,_.board_can_move(this.ptr,r,n)>>>0}validate_man_move(t,e,r){k(t,E);var n=t.ptr;t.ptr=0,k(e,E);var a=e.ptr;e.ptr=0,k(r,C);var c=r.ptr;return r.ptr=0,_.board_validate_man_move(this.ptr,n,a,c)>>>0}validate_king_move(t,e,r){k(t,E);var n=t.ptr;t.ptr=0,k(e,E);var a=e.ptr;e.ptr=0,k(r,C);var c=r.ptr;return r.ptr=0,_.board_validate_king_move(this.ptr,n,a,c)>>>0}jumpee_idx(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;return e.ptr=0,_.board_jumpee_idx(this.ptr,r,n)>>>0}cells(){return _.board_cells(this.ptr)}num_cells(){return _.board_num_cells(this.ptr)>>>0}num_pieces(){return _.board_num_pieces(this.ptr)>>>0}num_player(t){return _.board_num_player(this.ptr,t)>>>0}score(){return _.board_score(this.ptr)}cell_state(t){return _.board_cell_state(this.ptr,t)>>>0}apply_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0;var a=_.board_apply_move(this.ptr,r,n);return j.__wrap(a)}apply_jump(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0;var a=_.board_apply_jump(this.ptr,r,n);return j.__wrap(a)}king_row_idx(){return _.board_king_row_idx(this.ptr)>>>0}static validate_jumpee(t,e){k(t,A);var r=t.ptr;t.ptr=0,k(e,C);var n=e.ptr;return e.ptr=0,_.board_validate_jumpee(r,n)>>>0}static check_jumpee_team(t,e){k(t,C);var r=t.ptr;t.ptr=0,k(e,C);var n=e.ptr;return e.ptr=0,0!==_.board_check_jumpee_team(r,n)}constructor(t,e,r){var n=_.board_new(t,e,r);return j.__wrap(n)}static init_game(t,e){k(t,j);var r=t.ptr;t.ptr=0;var n=_.board_init_game(r,e);return j.__wrap(n)}}class E{static __wrap(t){const e=Object.create(E.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();_.__wbg_brdidx_free(t)}get row(){return _.__wbg_get_brdidx_row(this.ptr)>>>0}set row(t){_.__wbg_set_brdidx_row(this.ptr,t)}get col(){return _.__wbg_get_brdidx_col(this.ptr)>>>0}set col(t){_.__wbg_set_brdidx_col(this.ptr,t)}constructor(t,e){var r=_.brdidx_from(t,e);return E.__wrap(r)}eq(t){return k(t,E),0!==_.brdidx_eq(this.ptr,t.ptr)}}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();_.__wbg_game_free(t)}get last_node_count(){return _.__wbg_get_game_last_node_count(this.ptr)>>>0}set last_node_count(t){_.__wbg_set_game_last_node_count(this.ptr,t)}get perfect_chance(){return _.__wbg_get_game_perfect_chance(this.ptr)}set perfect_chance(t){_.__wbg_set_game_perfect_chance(this.ptr,t)}current_board_cells(){return _.game_current_board_cells(this.ptr)}current_board_len(){return _.game_current_board_len(this.ptr)>>>0}current_turn(){return _.game_current_turn(this.ptr)>>>0}score(){return _.game_score(this.ptr)}winning(){var t=_.game_winning(this.ptr);return 2===t?void 0:t}has_won(){var t=_.game_has_won(this.ptr);return 2===t?void 0:t}current_cell_state(t){k(t,E);var e=_.game_current_cell_state(this.ptr,t.ptr);return A.__wrap(e)}set_search_depth(t){_.game_set_search_depth(this.ptr,t)}set_selected(t){k(t,E),_.game_set_selected(this.ptr,t.ptr)}set_perfect_chance(t){_.game_set_perfect_chance(this.ptr,t)}clear_selected(){_.game_clear_selected(this.ptr)}make_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;return e.ptr=0,_.game_make_move(this.ptr,r,n)>>>0}execute_move(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0,_.game_execute_move(this.ptr,r,n)}execute_jump(t,e){k(t,E);var r=t.ptr;t.ptr=0,k(e,E);var n=e.ptr;e.ptr=0,_.game_execute_jump(this.ptr,r,n)}push_new_board(t){k(t,j);var e=t.ptr;t.ptr=0,_.game_push_new_board(this.ptr,e)}set_current(t){k(t,j);var e=t.ptr;t.ptr=0,_.game_set_current(this.ptr,e)}constructor(t,e,r,n,a){var c=_.game_new(t,e,r,n,a);return B.__wrap(c)}static new_with_canvas(t,e,r,n,a,c,o,i){var s=w(c,_.__wbindgen_malloc,_.__wbindgen_realloc),u=g,l=_.game_new_with_canvas(t,e,r,n,a,s,u,o,i);return B.__wrap(l)}set_painter(t){k(t,q);var e=t.ptr;t.ptr=0,_.game_set_painter(this.ptr,e)}draw(){_.game_draw(this.ptr)}ai_move(){_.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();_.__wbg_painter_free(t)}constructor(t,e,r){var n=w(r,_.__wbindgen_malloc,_.__wbindgen_realloc),a=g,c=_.painter_new(t,e,n,a);return q.__wrap(c)}static new_with_canvas(t,e,r){var n=_.painter_new_with_canvas(t,e,d(r));return q.__wrap(n)}set_square_outline(t){_.painter_set_square_outline(this.ptr,d(t))}set_outline_width(t){_.painter_set_outline_width(this.ptr,t)}set_draw_outline(t){_.painter_set_draw_outline(this.ptr,t)}reset_dimensions(){_.painter_reset_dimensions(this.ptr)}validate_board_dim(t){return k(t,j),0!==_.painter_validate_board_dim(this.ptr,t.ptr)}draw(t){k(t,j),_.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();_.__wbg_piece_free(t)}get team(){return _.__wbg_get_piece_team(this.ptr)>>>0}set team(t){_.__wbg_set_piece_team(this.ptr,t)}get strength(){return _.__wbg_get_piece_strength(this.ptr)>>>0}set strength(t){_.__wbg_set_piece_strength(this.ptr,t)}constructor(t,e){var r=_.piece_new(t,e);return C.__wrap(r)}}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();_.__wbg_square_free(t)}get occupant(){var t=_.__wbg_get_square_occupant(this.ptr);return 0===t?void 0:C.__wrap(t)}set occupant(t){let e=0;y(t)||(k(t,C),e=t.ptr,t.ptr=0),_.__wbg_set_square_occupant(this.ptr,e)}get state(){return _.__wbg_get_square_state(this.ptr)>>>0}set state(t){_.__wbg_set_square_state(this.ptr,t)}constructor(t,e){let r=0;y(e)||(k(e,C),r=e.ptr,e.ptr=0);var n=_.square_new(t,r);return A.__wrap(n)}static pc(t,e){var r=_.square_pc(t,e);return A.__wrap(r)}static empty(){var t=_.square_empty();return A.__wrap(t)}static unplay(){var t=_.square_unplay();return A.__wrap(t)}}function U(t){!function(t){const e=o(t);(function(t){t<36||(c[t]=i,i=t)})(t)}(t)}function W(t,e){return d(p(t,e))}function R(){return d(new Error)}function Z(t,e){var r=w(o(e).stack,_.__wbindgen_malloc,_.__wbindgen_realloc),n=g;v()[t/4+1]=n,v()[t/4+0]=r}function $(t,e){try{console.error(p(t,e))}finally{_.__wbindgen_free(t,e)}}function Y(){return T((function(){return d(self.self)}),arguments)}function M(t){return d(o(t).crypto)}function D(t){return d(o(t).msCrypto)}function z(t){return void 0===o(t)}function J(t,e,r){return d(o(t).require(p(e,r)))}function P(t){return d(o(t).getRandomValues)}function F(t,e){o(t).getRandomValues(o(e))}function G(t,e,r){var n,_;o(t).randomFillSync((n=e,_=r,l().subarray(n/1,n/1+_)))}function L(){return d(t)}function N(t){return o(t)instanceof Window}function H(t){var e=o(t).document;return y(e)?0:d(e)}function X(t,e,r){var n=o(t).getElementById(p(e,r));return y(n)?0:d(n)}function K(t){console.error(o(t))}function V(t){console.log(o(t))}function Q(t){return o(t)instanceof CanvasRenderingContext2D}function tt(t,e){o(t).strokeStyle=o(e)}function et(t,e){o(t).fillStyle=o(e)}function rt(t,e){o(t).lineWidth=e}function nt(t){o(t).beginPath()}function _t(t){o(t).fill()}function at(t){o(t).stroke()}function ct(){return T((function(t,e,r,n,_,a){o(t).arc(e,r,n,_,a)}),arguments)}function ot(t,e,r,n,_){o(t).fillRect(e,r,n,_)}function it(t,e,r,n,_){o(t).strokeRect(e,r,n,_)}function st(t){return o(t)instanceof HTMLCanvasElement}function ut(t,e){o(t).width=e>>>0}function lt(t,e){o(t).height=e>>>0}function pt(){return T((function(t,e,r){var n=o(t).getContext(p(e,r));return y(n)?0:d(n)}),arguments)}function dt(t,e){return d(new Function(p(t,e)))}function bt(){return T((function(t,e){return d(o(t).call(o(e)))}),arguments)}function gt(){return T((function(){return d(self.self)}),arguments)}function ht(){return T((function(){return d(window.window)}),arguments)}function ft(){return T((function(){return d(globalThis.globalThis)}),arguments)}function wt(){return T((function(){return d(r.g.global)}),arguments)}function mt(t){return d(o(t).buffer)}function vt(t){return d(new Uint8Array(o(t)))}function yt(t,e,r){o(t).set(o(e),r>>>0)}function kt(t){return o(t).length}function xt(t){return d(new Uint8Array(t>>>0))}function Tt(t,e,r){return d(o(t).subarray(e>>>0,r>>>0))}function Ot(t){return d(o(t))}function St(t,e){var r=w(b(o(e)),_.__wbindgen_malloc,_.__wbindgen_realloc),n=g;v()[t/4+1]=n,v()[t/4+0]=r}function It(t,e){throw new Error(p(t,e))}function jt(){return d(_.memory)}}))},813:(t,e,r)=>{"use strict";var n=([n])=>r.v(e,t.id,"37e7eaeb128933a44b73",{"./draught_bg.js":{__wbindgen_object_drop_ref:n.ug,__wbindgen_string_new:n.h4,__wbg_new_693216e109162396:n.Ih,__wbg_stack_0ddaca5d1abfb52f:n.yq,__wbg_error_09919627ac0992f5:n.gk,__wbg_self_86b4b13392c7af56:n.U5,__wbg_crypto_b8c92eaac23d0d80:n.iY,__wbg_msCrypto_9ad6677321a08dd8:n.mS,__wbindgen_is_undefined:n.XP,__wbg_require_f5521a5b85ad2542:n.K0,__wbg_getRandomValues_dd27e6b0652b3236:n.yX,__wbg_getRandomValues_e57c9b75ddead065:n.ae,__wbg_randomFillSync_d2ba53160aec6aba:n.Os,__wbg_static_accessor_MODULE_452b4680e8614c81:n.DA,__wbg_instanceof_Window_434ce1849eb4e0fc:n.xA,__wbg_document_5edd43643d1060d9:n.p$,__wbg_getElementById_b30e88aff96f66a1:n.zG,__wbg_error_ca520cb687b085a1:n.q5,__wbg_log_fbd13631356d44e4:n.r2,__wbg_instanceof_CanvasRenderingContext2d_e8b3a478a1b32d55:n.pv,__wbg_setstrokeStyle_4c9ff9ea0c0c4092:n.cF,__wbg_setfillStyle_680401a47926faa5:n.N_,__wbg_setlineWidth_4819b1bc5c54719b:n.S2,__wbg_beginPath_5a6fcb370b5b8eb3:n.on,__wbg_fill_0ced47ff22561640:n.CZ,__wbg_stroke_46c6315e5e1f35db:n.Ox,__wbg_arc_b3cb1027882c81bb:n.kP,__wbg_fillRect_7ad775936c1881ce:n.GR,__wbg_strokeRect_a3f2f571f1ad9730:n.Yl,__wbg_instanceof_HtmlCanvasElement_a6157e470d06b638:n.CU,__wbg_setwidth_362e8db8cbadbe96:n.RA,__wbg_setheight_28f53831182cc410:n.Si,__wbg_getContext_bd4e9445094eda84:n.c7,__wbg_newnoargs_f579424187aa1717:n.bf,__wbg_call_89558c3e96703ca1:n.Z4,__wbg_self_e23d74ae45fb17d1:n.tL,__wbg_window_b4be7f48b24ac56e:n.Qu,__wbg_globalThis_d61b1f48a57191ae:n.EB,__wbg_global_e7669da72fd7f239:n.Yc,__wbg_buffer_5e74a88a1424a2e0:n.rf,__wbg_new_e3b800e570795b3c:n.Ts,__wbg_set_5b8081e9d002f0df:n.Mz,__wbg_length_30803400a8f15c59:n.Zu,__wbg_newwithlength_5f4ce114a24dfe1e:n._G,__wbg_subarray_a68f835ca2af506f:n.kC,__wbindgen_object_clone_ref:n.m_,__wbindgen_debug_string:n.fY,__wbindgen_throw:n.Or,__wbindgen_memory:n.oH}});r.a(t,(t=>{var e=t([r(171)]);return e.then?e.then(n):n(e)}),1)},10:(t,e,r)=>{"use strict";r.a(t,(async t=>{r.r(e);var n=r(171),_=t([n]);n=(_.then?await _:_)[0];var a=8,c=8,o=3,i=4,s=.5;const u="human_turn.thinking",l="human_turn.from_selected";(0,n.wc)(),document.getElementById("status-p");const p=document.getElementById("status-d"),d=document.getElementById("team-p"),b=document.getElementById("node-count"),g=document.getElementById("winning-p");document.getElementById("startBtn").onclick=T;let h=null,f=null,w=function(t,e="danger",r=!0){null!=f&&clearInterval(f),p.className=`alert alert-${e}`,p.innerText=t,p.hidden=!1,r&&(f=setTimeout((()=>{p.hidden=!0}),3e3))},m=u,v=null,y=null,k=[];T();const x=document.getElementById("game-canvas");function T(){v=new n.lA(a,c,o,n.SZ.Black,i),y=new n.Ck(720,720,"game-canvas"),v.set_painter(y),v.draw(),clearInterval(h),O(),S(),k=[],m=u}function O(){switch(v.current_turn()){case n.SZ.White:d.innerText="⚪ White ⚪";break;case n.SZ.Black:d.innerText="🔴 Black 🔴"}}function S(){switch(v.winning()){case void 0:g.innerText="";break;case n.SZ.White:g.innerText="👑 White 👑";break;case n.SZ.Black:g.innerText="👑 Black 👑"}}x.addEventListener("click",(t=>{var e=function(t,e){var r=t.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(x,t);!function(t){switch(m){case u:if(v.current_cell_state(t).state!=n.i0.Occupied)return;if(v.current_cell_state(t).occupant.team!=v.current_turn())return;k.push(t),m=l,v.set_selected(t),v.draw();break;case l:if(!k[0].eq(t)){if(v.current_cell_state(t).state!=n.i0.Empty)return;if(k.push(t),2!=k.length)return w(`Error: wrong number of clicks to process ${k.length}`),void console.error(`Error: wrong number of clicks to process ${k.length}`);switch(v.make_move(k[0],k[1])){case n.Tt.Allowed:q.checked&&void 0===v.has_won()&&(v.ai_move(),b.innerText=`searched ${v.last_node_count.toLocaleString("en-GB")} possible moves`);break;case n.Tt.IllegalTrajectory:w("You can't move like that!");break;case n.Tt.JumpingSameTeam:w("You can't jump your own piece!");break;case n.Tt.NoJumpablePiece:w("There's nothing to jump!");break;case n.Tt.OccupiedDest:w("There's a piece there!");break;case n.Tt.OutOfBounds:w("That square's not on the board! (how have you managed that?)");break;case n.Tt.UnoccupiedSrc:w("There's no piece to move!");break;case n.Tt.Unplayable:w("That's not a playable square!");break;case n.Tt.WrongTeamSrc:w("That's not your piece!")}}v.clear_selected(),v.draw(),k=[],m=u;break;case"ai_turn":console.log("It's the AI's turn!")}O(),S(),function(){switch(v.has_won()){case void 0:break;case n.SZ.White:w("You Lost!"),h=setInterval((()=>{T()}),3e3);break;case n.SZ.Black:w("You Won!","success"),h=setInterval((()=>{T()}),3e3)}}()}(new n.rh(Math.floor(e.y/x.clientHeight*c),Math.floor(e.x/x.clientWidth*a)))}));const I=document.getElementById("width");I.onchange=()=>{a=parseInt(I.value),T()},I.value=8;const j=document.getElementById("height");j.onchange=()=>{c=parseInt(j.value),E.max=c/2-1,T()},j.value=8;const E=document.getElementById("play_rows");E.onchange=()=>{o=parseInt(E.value),T()},E.value=3;const B=document.getElementById("ai_search_depth");B.onchange=()=>{i=parseInt(B.value),v.set_search_depth(i),i>4&&w("This increases thinking time exponentially, be careful (probably don't go past 6)","warning")},B.value=4;const q=document.getElementById("ai-checkbox");q.onchange=()=>{};const C=document.getElementById("ai_difficulty");C.onchange=()=>{s=parseInt(C.value)/100,v.set_perfect_chance(s)},C.value=50}))}}]); //# sourceMappingURL=10.bootstrap.js.map \ No newline at end of file diff --git a/10.bootstrap.js.map b/10.bootstrap.js.map index 2fdc52a..ecb4ae7 100644 --- a/10.bootstrap.js.map +++ b/10.bootstrap.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://draught/../pkg/draught_bg.js","webpack://draught/./index.js"],"names":["heap","Array","fill","undefined","getObject","idx","push","heap_next","length","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","create","prototype","__destroy_into_raw","arg0","ret","Square","__wrap","square","ptr0","BrdIdx","row","col","from","to","ptr1","from_square_occupant","Piece","ptr2","team","jumpee","from_occ","width","height","current_turn","board","piece_rows","other","Game","search_depth","new_chance","first_turn","canvas_id","canvas_width","canvas_height","len0","value","Painter","canvas","strength","state","occupant","__wbindgen_object_drop_ref","dropObject","takeObject","__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_434ce1849eb4e0fc","Window","__wbg_document_5edd43643d1060d9","document","__wbg_getElementById_b30e88aff96f66a1","getElementById","__wbg_error_ca520cb687b085a1","__wbg_log_fbd13631356d44e4","log","__wbg_instanceof_CanvasRenderingContext2d_e8b3a478a1b32d55","CanvasRenderingContext2D","__wbg_setstrokeStyle_4c9ff9ea0c0c4092","strokeStyle","__wbg_setfillStyle_680401a47926faa5","fillStyle","__wbg_setlineWidth_4819b1bc5c54719b","lineWidth","__wbg_beginPath_5a6fcb370b5b8eb3","beginPath","__wbg_fill_0ced47ff22561640","__wbg_stroke_46c6315e5e1f35db","stroke","__wbg_arc_b3cb1027882c81bb","arg3","arg4","arg5","arc","__wbg_fillRect_7ad775936c1881ce","fillRect","__wbg_strokeRect_a3f2f571f1ad9730","strokeRect","__wbg_instanceof_HtmlCanvasElement_a6157e470d06b638","HTMLCanvasElement","__wbg_setwidth_362e8db8cbadbe96","__wbg_setheight_28f53831182cc410","__wbg_getContext_bd4e9445094eda84","getContext","__wbg_newnoargs_f579424187aa1717","Function","__wbg_call_89558c3e96703ca1","__wbg_self_e23d74ae45fb17d1","__wbg_window_b4be7f48b24ac56e","window","__wbg_globalThis_d61b1f48a57191ae","globalThis","__wbg_global_e7669da72fd7f239","g","global","__wbg_buffer_5e74a88a1424a2e0","__wbg_new_e3b800e570795b3c","__wbg_set_5b8081e9d002f0df","__wbg_length_30803400a8f15c59","__wbg_newwithlength_5f4ce114a24dfe1e","__wbg_subarray_a68f835ca2af506f","__wbindgen_object_clone_ref","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_memory","BOARD_WIDTH","BOARD_HEIGHT","PIECE_ROWS","SEARCH_DEPTH","PERFECT_CHANCE","GameState","statusAlert","teamText","nodeCountText","winningText","onclick","start_game","wonTimeout","statusTimeout","setStatus","txt","alertType","hide","clearInterval","innerText","hidden","setTimeout","current_state","game","painter","clicks","set_painter","draw","updateTeamText","updateWinningText","winning","addEventListener","event","mousepos","evt","rect","getBoundingClientRect","clientX","left","y","clientY","top","getMousePos","cell_coord","current_cell_state","set_selected","eq","make_move","aiCheckBox","checked","has_won","ai_move","last_node_count","toLocaleString","clear_selected","setInterval","checkWon","process_canvas_click","Math","floor","clientHeight","clientWidth","widthBox","onchange","parseInt","heightBox","pieceRowsBox","max","aiSearchDepthBox","set_search_depth","aiPerfectChance","set_perfect_chance"],"mappings":"2sBAEA,MAAMA,EAAO,IAAIC,MAAM,IAAIC,UAAKC,GAIhC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,GAFtCL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EAAKQ,OAgBrB,IAAIC,EAAoB,IAFoB,oBAAhBC,aAA8B,EAAIC,EAAOC,SAAS,QAAQF,YAAcA,aAE3D,QAAS,CAAEG,WAAW,E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ASxJ,MAAQ,EAEjB,MAAM2J,EAAYxH,SAASE,eAAe,UAU1CsH,EAAUF,SANO,KAEb9D,EAAe+D,SAASC,EAAU3J,OAClC4J,EAAaC,IAAQlE,EAAe,EAAK,EACzCU,KAGJsD,EAAU3J,MAAQ,EAElB,MAAM4J,EAAezH,SAASE,eAAe,aAS7CuH,EAAaH,SALO,KAEhB7D,EAAa8D,SAASE,EAAa5J,OACnCqG,KAGJuD,EAAa5J,MAAQ,EAErB,MAAM8J,EAAmB3H,SAASE,eAAe,mBAajDyH,EAAiBL,SATO,KAEpB5D,EAAe6D,SAASI,EAAiB9J,OACzCiH,EAAK8C,iBAAiBlE,GAEnBA,EAAe,GACdW,EAAU,oFAAqF,YAIvGsD,EAAiB9J,MAAQ,EAEzB,MAAM0I,EAAavG,SAASE,eAAe,eAO3CqG,EAAWe,SAHO,OAMlB,MAAMO,EAAkB7H,SAASE,eAAe,iBAShD2H,EAAgBP,SALQ,KAEpB3D,EAAiB4D,SAASM,EAAgBhK,OAAS,IACnDiH,EAAKgD,mBAAmBnE,IAG5BkE,EAAgBhK,MAAQ","file":"10.bootstrap.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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var ret = wasm.game_score(this.ptr);\n return ret;\n }\n /**\n * Get currently winning player\n * @returns {number | undefined}\n */\n winning() {\n var 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 var 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 var 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 var 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 var 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 var ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var 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 var ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_693216e109162396() {\n var ret = new Error();\n return addHeapObject(ret);\n};\n\nexport function __wbg_stack_0ddaca5d1abfb52f(arg0, arg1) {\n var ret = getObject(arg1).stack;\n var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var 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 var ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_crypto_b8c92eaac23d0d80(arg0) {\n var ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nexport function __wbg_msCrypto_9ad6677321a08dd8(arg0) {\n var ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_is_undefined(arg0) {\n var ret = getObject(arg0) === undefined;\n return ret;\n};\n\nexport function __wbg_require_f5521a5b85ad2542(arg0, arg1, arg2) {\n var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_dd27e6b0652b3236(arg0) {\n var ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n};\n\nexport function __wbg_static_accessor_MODULE_452b4680e8614c81() {\n var ret = module;\n return addHeapObject(ret);\n};\n\nexport function __wbg_instanceof_Window_434ce1849eb4e0fc(arg0) {\n var ret = getObject(arg0) instanceof Window;\n return ret;\n};\n\nexport function __wbg_document_5edd43643d1060d9(arg0) {\n var ret = getObject(arg0).document;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_getElementById_b30e88aff96f66a1(arg0, arg1, arg2) {\n var ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_error_ca520cb687b085a1(arg0) {\n console.error(getObject(arg0));\n};\n\nexport function __wbg_log_fbd13631356d44e4(arg0) {\n console.log(getObject(arg0));\n};\n\nexport function __wbg_instanceof_CanvasRenderingContext2d_e8b3a478a1b32d55(arg0) {\n var ret = getObject(arg0) instanceof CanvasRenderingContext2D;\n return ret;\n};\n\nexport function __wbg_setstrokeStyle_4c9ff9ea0c0c4092(arg0, arg1) {\n getObject(arg0).strokeStyle = getObject(arg1);\n};\n\nexport function __wbg_setfillStyle_680401a47926faa5(arg0, arg1) {\n getObject(arg0).fillStyle = getObject(arg1);\n};\n\nexport function __wbg_setlineWidth_4819b1bc5c54719b(arg0, arg1) {\n getObject(arg0).lineWidth = arg1;\n};\n\nexport function __wbg_beginPath_5a6fcb370b5b8eb3(arg0) {\n getObject(arg0).beginPath();\n};\n\nexport function __wbg_fill_0ced47ff22561640(arg0) {\n getObject(arg0).fill();\n};\n\nexport function __wbg_stroke_46c6315e5e1f35db(arg0) {\n getObject(arg0).stroke();\n};\n\nexport function __wbg_arc_b3cb1027882c81bb() { 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_7ad775936c1881ce(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).fillRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_strokeRect_a3f2f571f1ad9730(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_instanceof_HtmlCanvasElement_a6157e470d06b638(arg0) {\n var ret = getObject(arg0) instanceof HTMLCanvasElement;\n return ret;\n};\n\nexport function __wbg_setwidth_362e8db8cbadbe96(arg0, arg1) {\n getObject(arg0).width = arg1 >>> 0;\n};\n\nexport function __wbg_setheight_28f53831182cc410(arg0, arg1) {\n getObject(arg0).height = arg1 >>> 0;\n};\n\nexport function __wbg_getContext_bd4e9445094eda84() { return handleError(function (arg0, arg1, arg2) {\n var ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_newnoargs_f579424187aa1717(arg0, arg1) {\n var ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nexport function __wbg_call_89558c3e96703ca1() { return handleError(function (arg0, arg1) {\n var ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_self_e23d74ae45fb17d1() { return handleError(function () {\n var ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_window_b4be7f48b24ac56e() { return handleError(function () {\n var ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_globalThis_d61b1f48a57191ae() { return handleError(function () {\n var ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_global_e7669da72fd7f239() { return handleError(function () {\n var ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_buffer_5e74a88a1424a2e0(arg0) {\n var ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_e3b800e570795b3c(arg0) {\n var ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nexport function __wbg_set_5b8081e9d002f0df(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nexport function __wbg_length_30803400a8f15c59(arg0) {\n var ret = getObject(arg0).length;\n return ret;\n};\n\nexport function __wbg_newwithlength_5f4ce114a24dfe1e(arg0) {\n var ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbg_subarray_a68f835ca2af506f(arg0, arg1, arg2) {\n var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_object_clone_ref(arg0) {\n var ret = getObject(arg0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_debug_string(arg0, arg1) {\n var ret = debugString(getObject(arg1));\n var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var 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 var 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 game.ai_move();\n nodeCountText.innerText = `searched ${game.last_node_count.toLocaleString(\"en-GB\")} possible moves`;\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;"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://draught/../pkg/draught_bg.js","webpack://draught/./index.js"],"names":["heap","Array","fill","undefined","getObject","idx","push","heap_next","length","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","create","prototype","__destroy_into_raw","arg0","ret","Square","__wrap","square","ptr0","BrdIdx","row","col","from","to","ptr1","from_square_occupant","Piece","ptr2","team","jumpee","from_occ","width","height","current_turn","board","piece_rows","other","Game","search_depth","new_chance","first_turn","canvas_id","canvas_width","canvas_height","len0","value","Painter","canvas","strength","state","occupant","__wbindgen_object_drop_ref","dropObject","takeObject","__wbindgen_string_new","arg1","__wbg_new_693216e109162396","__wbg_stack_0ddaca5d1abfb52f","__wbg_error_09919627ac0992f5","console","error","__wbg_self_86b4b13392c7af56","self","arguments","__wbg_crypto_b8c92eaac23d0d80","crypto","__wbg_msCrypto_9ad6677321a08dd8","msCrypto","__wbindgen_is_undefined","__wbg_require_f5521a5b85ad2542","arg2","__wbg_getRandomValues_dd27e6b0652b3236","getRandomValues","__wbg_getRandomValues_e57c9b75ddead065","__wbg_randomFillSync_d2ba53160aec6aba","randomFillSync","__wbg_static_accessor_MODULE_452b4680e8614c81","__wbg_instanceof_Window_434ce1849eb4e0fc","Window","__wbg_document_5edd43643d1060d9","document","__wbg_getElementById_b30e88aff96f66a1","getElementById","__wbg_error_ca520cb687b085a1","__wbg_log_fbd13631356d44e4","log","__wbg_instanceof_CanvasRenderingContext2d_e8b3a478a1b32d55","CanvasRenderingContext2D","__wbg_setstrokeStyle_4c9ff9ea0c0c4092","strokeStyle","__wbg_setfillStyle_680401a47926faa5","fillStyle","__wbg_setlineWidth_4819b1bc5c54719b","lineWidth","__wbg_beginPath_5a6fcb370b5b8eb3","beginPath","__wbg_fill_0ced47ff22561640","__wbg_stroke_46c6315e5e1f35db","stroke","__wbg_arc_b3cb1027882c81bb","arg3","arg4","arg5","arc","__wbg_fillRect_7ad775936c1881ce","fillRect","__wbg_strokeRect_a3f2f571f1ad9730","strokeRect","__wbg_instanceof_HtmlCanvasElement_a6157e470d06b638","HTMLCanvasElement","__wbg_setwidth_362e8db8cbadbe96","__wbg_setheight_28f53831182cc410","__wbg_getContext_bd4e9445094eda84","getContext","__wbg_newnoargs_f579424187aa1717","Function","__wbg_call_89558c3e96703ca1","__wbg_self_e23d74ae45fb17d1","__wbg_window_b4be7f48b24ac56e","window","__wbg_globalThis_d61b1f48a57191ae","globalThis","__wbg_global_e7669da72fd7f239","g","global","__wbg_buffer_5e74a88a1424a2e0","__wbg_new_e3b800e570795b3c","__wbg_set_5b8081e9d002f0df","__wbg_length_30803400a8f15c59","__wbg_newwithlength_5f4ce114a24dfe1e","__wbg_subarray_a68f835ca2af506f","__wbindgen_object_clone_ref","__wbindgen_debug_string","__wbindgen_throw","__wbindgen_memory","BOARD_WIDTH","BOARD_HEIGHT","PIECE_ROWS","SEARCH_DEPTH","PERFECT_CHANCE","GameState","statusAlert","teamText","nodeCountText","winningText","onclick","start_game","wonTimeout","statusTimeout","setStatus","txt","alertType","hide","clearInterval","innerText","hidden","setTimeout","current_state","game","painter","clicks","set_painter","draw","updateTeamText","updateWinningText","winning","addEventListener","event","mousepos","evt","rect","getBoundingClientRect","clientX","left","y","clientY","top","getMousePos","cell_coord","current_cell_state","set_selected","eq","make_move","aiCheckBox","checked","has_won","ai_move","last_node_count","toLocaleString","clear_selected","setInterval","checkWon","process_canvas_click","Math","floor","clientHeight","clientWidth","widthBox","onchange","parseInt","heightBox","pieceRowsBox","max","aiSearchDepthBox","set_search_depth","aiPerfectChance","set_perfect_chance"],"mappings":"2sBAEA,MAAMA,EAAO,IAAIC,MAAM,IAAIC,UAAKC,GAIhC,SAASC,EAAUC,GAAO,OAAOL,EAAKK,GAFtCL,EAAKM,UAAKH,EAAW,MAAM,GAAM,GAIjC,IAAII,EAAYP,EAAKQ,OAgBrB,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,EAGX,SAASI,EAAmBC,EAAKC,GAC7B,OAAOb,EAAkBM,OAAOE,IAAkBM,SAASF,EAAKA,EAAMC,IAG1E,SAASE,EAAcC,GACflB,IAAcP,EAAKQ,QAAQR,EAAKM,KAAKN,EAAKQ,OAAS,GACvD,MAAMH,EAAME,EAIZ,OAHAA,EAAYP,EAAKK,GAEjBL,EAAKK,GAAOoB,EACLpB,EAGX,SAASqB,EAAYC,GAEjB,MAAMC,SAAcD,EACpB,GAAY,UAARC,GAA4B,WAARA,GAA4B,MAAPD,EACzC,MAAQ,GAAGA,IAEf,GAAY,UAARC,EACA,MAAO,IAAID,KAEf,GAAY,UAARC,EAAkB,CAClB,MAAMC,EAAcF,EAAIE,YACxB,OAAmB,MAAfA,EACO,SAEA,UAAUA,KAGzB,GAAY,YAARD,EAAoB,CACpB,MAAME,EAAOH,EAAIG,KACjB,MAAmB,iBAARA,GAAoBA,EAAKtB,OA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ourcesContent":["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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var ret = wasm.game_score(this.ptr);\n return ret;\n }\n /**\n * Get currently winning player\n * @returns {number | undefined}\n */\n winning() {\n var 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 var 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 var 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 var 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 var 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 var ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var 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 var ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 var ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_693216e109162396() {\n var ret = new Error();\n return addHeapObject(ret);\n};\n\nexport function __wbg_stack_0ddaca5d1abfb52f(arg0, arg1) {\n var ret = getObject(arg1).stack;\n var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var 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_self_86b4b13392c7af56() { return handleError(function () {\n var ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_crypto_b8c92eaac23d0d80(arg0) {\n var ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n};\n\nexport function __wbg_msCrypto_9ad6677321a08dd8(arg0) {\n var ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_is_undefined(arg0) {\n var ret = getObject(arg0) === undefined;\n return ret;\n};\n\nexport function __wbg_require_f5521a5b85ad2542(arg0, arg1, arg2) {\n var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_dd27e6b0652b3236(arg0) {\n var ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n};\n\nexport function __wbg_getRandomValues_e57c9b75ddead065(arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n};\n\nexport function __wbg_randomFillSync_d2ba53160aec6aba(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n};\n\nexport function __wbg_static_accessor_MODULE_452b4680e8614c81() {\n var ret = module;\n return addHeapObject(ret);\n};\n\nexport function __wbg_instanceof_Window_434ce1849eb4e0fc(arg0) {\n var ret = getObject(arg0) instanceof Window;\n return ret;\n};\n\nexport function __wbg_document_5edd43643d1060d9(arg0) {\n var ret = getObject(arg0).document;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_getElementById_b30e88aff96f66a1(arg0, arg1, arg2) {\n var ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n};\n\nexport function __wbg_error_ca520cb687b085a1(arg0) {\n console.error(getObject(arg0));\n};\n\nexport function __wbg_log_fbd13631356d44e4(arg0) {\n console.log(getObject(arg0));\n};\n\nexport function __wbg_instanceof_CanvasRenderingContext2d_e8b3a478a1b32d55(arg0) {\n var ret = getObject(arg0) instanceof CanvasRenderingContext2D;\n return ret;\n};\n\nexport function __wbg_setstrokeStyle_4c9ff9ea0c0c4092(arg0, arg1) {\n getObject(arg0).strokeStyle = getObject(arg1);\n};\n\nexport function __wbg_setfillStyle_680401a47926faa5(arg0, arg1) {\n getObject(arg0).fillStyle = getObject(arg1);\n};\n\nexport function __wbg_setlineWidth_4819b1bc5c54719b(arg0, arg1) {\n getObject(arg0).lineWidth = arg1;\n};\n\nexport function __wbg_beginPath_5a6fcb370b5b8eb3(arg0) {\n getObject(arg0).beginPath();\n};\n\nexport function __wbg_fill_0ced47ff22561640(arg0) {\n getObject(arg0).fill();\n};\n\nexport function __wbg_stroke_46c6315e5e1f35db(arg0) {\n getObject(arg0).stroke();\n};\n\nexport function __wbg_arc_b3cb1027882c81bb() { 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_7ad775936c1881ce(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).fillRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_strokeRect_a3f2f571f1ad9730(arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);\n};\n\nexport function __wbg_instanceof_HtmlCanvasElement_a6157e470d06b638(arg0) {\n var ret = getObject(arg0) instanceof HTMLCanvasElement;\n return ret;\n};\n\nexport function __wbg_setwidth_362e8db8cbadbe96(arg0, arg1) {\n getObject(arg0).width = arg1 >>> 0;\n};\n\nexport function __wbg_setheight_28f53831182cc410(arg0, arg1) {\n getObject(arg0).height = arg1 >>> 0;\n};\n\nexport function __wbg_getContext_bd4e9445094eda84() { return handleError(function (arg0, arg1, arg2) {\n var ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_newnoargs_f579424187aa1717(arg0, arg1) {\n var ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n};\n\nexport function __wbg_call_89558c3e96703ca1() { return handleError(function (arg0, arg1) {\n var ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_self_e23d74ae45fb17d1() { return handleError(function () {\n var ret = self.self;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_window_b4be7f48b24ac56e() { return handleError(function () {\n var ret = window.window;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_globalThis_d61b1f48a57191ae() { return handleError(function () {\n var ret = globalThis.globalThis;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_global_e7669da72fd7f239() { return handleError(function () {\n var ret = global.global;\n return addHeapObject(ret);\n}, arguments) };\n\nexport function __wbg_buffer_5e74a88a1424a2e0(arg0) {\n var ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n};\n\nexport function __wbg_new_e3b800e570795b3c(arg0) {\n var ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n};\n\nexport function __wbg_set_5b8081e9d002f0df(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n};\n\nexport function __wbg_length_30803400a8f15c59(arg0) {\n var ret = getObject(arg0).length;\n return ret;\n};\n\nexport function __wbg_newwithlength_5f4ce114a24dfe1e(arg0) {\n var ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbg_subarray_a68f835ca2af506f(arg0, arg1, arg2) {\n var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_object_clone_ref(arg0) {\n var ret = getObject(arg0);\n return addHeapObject(ret);\n};\n\nexport function __wbindgen_debug_string(arg0, arg1) {\n var ret = debugString(getObject(arg1));\n var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var 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 var 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 game.ai_move();\n nodeCountText.innerText = `searched ${game.last_node_count.toLocaleString(\"en-GB\")} possible moves`;\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;"],"sourceRoot":""} \ No newline at end of file diff --git a/37e7eaeb128933a44b73.module.wasm b/37e7eaeb128933a44b73.module.wasm new file mode 100644 index 0000000..f85e971 Binary files /dev/null and b/37e7eaeb128933a44b73.module.wasm differ diff --git a/5834d1c20fa287719232.module.wasm b/5834d1c20fa287719232.module.wasm deleted file mode 100644 index d1bc4bf..0000000 Binary files a/5834d1c20fa287719232.module.wasm and /dev/null differ diff --git a/doc/ayu.css b/doc/ayu.css index 1a8b5ad..5122904 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{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 #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{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.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:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a.srclink,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar a,.in-band a{color:#c5c5c5;}.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{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.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;}.since{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,:target>*{background:rgba(255,236,164,0.06);}:target{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.type,.content a.type,.block a.current.type{}.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-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{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#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;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,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;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}.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:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;} \ No newline at end of file + 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{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{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#14191f;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.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;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a.srclink,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar a,.in-band a{color:#c5c5c5;}.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{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.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;}.since{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{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#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;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,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;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}.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:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;} \ No newline at end of file diff --git a/doc/dark.css b/doc/dark.css index 84725b2..159f551 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{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) #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{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.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:#afc6e4;}a.result-mod:focus{background-color:#803a1b;}a.result-externcrate:focus{background-color:#396bac;}a.result-enum:focus{background-color:#5b4e68;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#38902c;}a.result-foreigntype:focus{background-color:#b200d6;}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:#0063cc;}a.result-primitive:focus{background-color:#00708a;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a.srclink,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar 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{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.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);}.since{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,:target>*{background-color:#494a3d;}:target{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-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#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;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.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 .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:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;} \ No newline at end of file +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{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{background-color:#333;}.source .sidebar{background-color:#565656;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.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;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a.srclink,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar 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{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.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);}.since{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-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#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;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.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 .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:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;} \ No newline at end of file diff --git a/doc/draught/all.html b/doc/draught/all.html index d908bda..69e93ad 100644 --- a/doc/draught/all.html +++ b/doc/draught/all.html @@ -1,5 +1,6 @@ -List of all items in this crate -

List of all items[] +List of all items in this crate +

Structs

Enums

Macros

Functions

Constants

\ No newline at end of file diff --git a/doc/draught/board/constant.STD_HEIGHT.html b/doc/draught/board/constant.STD_HEIGHT.html index cb368c4..ccab696 100644 --- a/doc/draught/board/constant.STD_HEIGHT.html +++ b/doc/draught/board/constant.STD_HEIGHT.html @@ -1,4 +1,5 @@ -STD_HEIGHT in draught::board - Rust -

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

pub const STD_HEIGHT: usize = 8;
Expand description

Standard height of a checkers board is 8 squares

-
+STD_HEIGHT in draught::board - Rust +

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

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 aa065f4..ceece7b 100644 --- a/doc/draught/board/constant.STD_WIDTH.html +++ b/doc/draught/board/constant.STD_WIDTH.html @@ -1,4 +1,5 @@ -STD_WIDTH in draught::board - Rust -

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

pub const STD_WIDTH: usize = 8;
Expand description

Standard width of a checkers board is 8 squares

-
+STD_WIDTH in draught::board - Rust +

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

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 bb14cb9..7c5d9dd 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,3 +1,4 @@ -__wbg_get_board_current_turn__const in draught::board - Rust -

Constant draught::board::__wbg_get_board_current_turn__const[][src]

const __wbg_get_board_current_turn__const: ();
+__wbg_get_board_current_turn__const in draught::board - Rust +

Constant draught::board::__wbg_get_board_current_turn__const[][src]

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 90ee91a..855d5ca 100644 --- a/doc/draught/board/constant.__wbg_get_board_height__const.html +++ b/doc/draught/board/constant.__wbg_get_board_height__const.html @@ -1,3 +1,4 @@ -__wbg_get_board_height__const in draught::board - Rust -

Constant draught::board::__wbg_get_board_height__const[][src]

const __wbg_get_board_height__const: ();
+__wbg_get_board_height__const in draught::board - Rust +

Constant draught::board::__wbg_get_board_height__const[][src]

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 3c7d8f1..4644668 100644 --- a/doc/draught/board/constant.__wbg_get_board_width__const.html +++ b/doc/draught/board/constant.__wbg_get_board_width__const.html @@ -1,3 +1,4 @@ -__wbg_get_board_width__const in draught::board - Rust -

Constant draught::board::__wbg_get_board_width__const[][src]

const __wbg_get_board_width__const: ();
+__wbg_get_board_width__const in draught::board - Rust +

Constant draught::board::__wbg_get_board_width__const[][src]

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 9d1f3d8..534825b 100644 --- a/doc/draught/board/constant.__wbg_get_brdidx_col__const.html +++ b/doc/draught/board/constant.__wbg_get_brdidx_col__const.html @@ -1,3 +1,4 @@ -__wbg_get_brdidx_col__const in draught::board - Rust -

Constant draught::board::__wbg_get_brdidx_col__const[][src]

const __wbg_get_brdidx_col__const: ();
+__wbg_get_brdidx_col__const in draught::board - Rust +

Constant draught::board::__wbg_get_brdidx_col__const[][src]

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 9b7bb45..9805f3c 100644 --- a/doc/draught/board/constant.__wbg_get_brdidx_row__const.html +++ b/doc/draught/board/constant.__wbg_get_brdidx_row__const.html @@ -1,3 +1,4 @@ -__wbg_get_brdidx_row__const in draught::board - Rust -

Constant draught::board::__wbg_get_brdidx_row__const[][src]

const __wbg_get_brdidx_row__const: ();
+__wbg_get_brdidx_row__const in draught::board - Rust +

Constant draught::board::__wbg_get_brdidx_row__const[][src]

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 d4461b2..3e62db4 100644 --- a/doc/draught/board/constant.__wbg_get_piece_strength__const.html +++ b/doc/draught/board/constant.__wbg_get_piece_strength__const.html @@ -1,3 +1,4 @@ -__wbg_get_piece_strength__const in draught::board - Rust -

Constant draught::board::__wbg_get_piece_strength__const[][src]

const __wbg_get_piece_strength__const: ();
+__wbg_get_piece_strength__const in draught::board - Rust +

Constant draught::board::__wbg_get_piece_strength__const[][src]

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 a4d6f1b..cb1ecb2 100644 --- a/doc/draught/board/constant.__wbg_get_piece_team__const.html +++ b/doc/draught/board/constant.__wbg_get_piece_team__const.html @@ -1,3 +1,4 @@ -__wbg_get_piece_team__const in draught::board - Rust -

Constant draught::board::__wbg_get_piece_team__const[][src]

const __wbg_get_piece_team__const: ();
+__wbg_get_piece_team__const in draught::board - Rust +

Constant draught::board::__wbg_get_piece_team__const[][src]

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 8203033..ac1617e 100644 --- a/doc/draught/board/constant.__wbg_get_square_occupant__const.html +++ b/doc/draught/board/constant.__wbg_get_square_occupant__const.html @@ -1,3 +1,4 @@ -__wbg_get_square_occupant__const in draught::board - Rust -

Constant draught::board::__wbg_get_square_occupant__const[][src]

const __wbg_get_square_occupant__const: ();
+__wbg_get_square_occupant__const in draught::board - Rust +

Constant draught::board::__wbg_get_square_occupant__const[][src]

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 d2e3b44..8afbf33 100644 --- a/doc/draught/board/constant.__wbg_get_square_state__const.html +++ b/doc/draught/board/constant.__wbg_get_square_state__const.html @@ -1,3 +1,4 @@ -__wbg_get_square_state__const in draught::board - Rust -

Constant draught::board::__wbg_get_square_state__const[][src]

const __wbg_get_square_state__const: ();
+__wbg_get_square_state__const in draught::board - Rust +

Constant draught::board::__wbg_get_square_state__const[][src]

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 8fd8fa1..008fc2c 100644 --- a/doc/draught/board/enums/enum.MoveType.html +++ b/doc/draught/board/enums/enum.MoveType.html @@ -1,41 +1,42 @@ -MoveType in draught::board::enums - Rust -

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

#[repr(u8)]
+MoveType in draught::board::enums - Rust
+    

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

#[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 +

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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ 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 26c8ad8..149f79c 100644 --- a/doc/draught/board/enums/enum.Moveable.html +++ b/doc/draught/board/enums/enum.Moveable.html @@ -1,5 +1,6 @@ -Moveable in draught::board::enums - Rust -

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

#[repr(u8)]
+Moveable in draught::board::enums - Rust
+    

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

#[repr(u8)]
 pub enum Moveable {
     Allowed,
     UnoccupiedSrc,
@@ -11,38 +12,38 @@ 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 +

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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ 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 db8ef03..f6c972c 100644 --- a/doc/draught/board/enums/enum.SquareState.html +++ b/doc/draught/board/enums/enum.SquareState.html @@ -1,44 +1,45 @@ -SquareState in draught::board::enums - Rust -

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

#[repr(u8)]
+SquareState in draught::board::enums - Rust
+    

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

#[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 +

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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ 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 7b95012..98b12a2 100644 --- a/doc/draught/board/enums/enum.Strength.html +++ b/doc/draught/board/enums/enum.Strength.html @@ -1,41 +1,42 @@ -Strength in draught::board::enums - Rust -

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

#[repr(u8)]
+Strength in draught::board::enums - Rust
+    

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

#[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 +

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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ 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 02776b2..d4f96f7 100644 --- a/doc/draught/board/enums/enum.Team.html +++ b/doc/draught/board/enums/enum.Team.html @@ -1,44 +1,45 @@ -Team in draught::board::enums - Rust -

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

#[repr(u8)]
+Team in draught::board::enums - Rust
+    

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

#[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 +

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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ No newline at end of file diff --git a/doc/draught/board/enums/index.html b/doc/draught/board/enums/index.html index 73468aa..7962e7f 100644 --- a/doc/draught/board/enums/index.html +++ b/doc/draught/board/enums/index.html @@ -1,9 +1,10 @@ -draught::board::enums - Rust -

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

Enums

+draught::board::enums - Rust +

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

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/index.html b/doc/draught/board/index.html index dec92cd..7a6b5ed 100644 --- a/doc/draught/board/index.html +++ b/doc/draught/board/index.html @@ -1,5 +1,6 @@ -draught::board - Rust -

Module draught::board[][src]

Expand description

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

+draught::board - Rust +

Module draught::board[][src]

Expand description

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

Modules

Structs

Single state of a checkers board

@@ -10,5 +11,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 5881bdc..40f6b5a 100644 --- a/doc/draught/board/iter/index.html +++ b/doc/draught/board/iter/index.html @@ -1,4 +1,5 @@ -draught::board::iter - Rust -

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

Structs

-
+draught::board::iter - Rust +
\ 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 4d989d0..f48b622 100644 --- a/doc/draught/board/iter/struct.PieceIterator.html +++ b/doc/draught/board/iter/struct.PieceIterator.html @@ -1,129 +1,132 @@ -PieceIterator in draught::board::iter - Rust -

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

pub struct PieceIterator<'a> {
+PieceIterator in draught::board::iter - Rust
+    

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

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

-

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

+

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

-

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

-

Performs the conversion.

-

Performs the conversion.

-

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 +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

+

Performs the conversion.

+

Performs the conversion.

+

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 a4d08d1..74a74d5 100644 --- a/doc/draught/board/iter/struct.RowIndexIterator.html +++ b/doc/draught/board/iter/struct.RowIndexIterator.html @@ -1,129 +1,132 @@ -RowIndexIterator in draught::board::iter - Rust -

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

pub struct RowIndexIterator<'a> {
+RowIndexIterator in draught::board::iter - Rust
+    

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

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

-

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

+

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

-

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

-

Performs the conversion.

-

Performs the conversion.

-

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 +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

+

Performs the conversion.

+

Performs the conversion.

+

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 c3eec71..b2c71f7 100644 --- a/doc/draught/board/iter/struct.RowSquareIterator.html +++ b/doc/draught/board/iter/struct.RowSquareIterator.html @@ -1,129 +1,132 @@ -RowSquareIterator in draught::board::iter - Rust -

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

pub struct RowSquareIterator<'a> {
+RowSquareIterator in draught::board::iter - Rust
+    

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

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

Fields

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

Implementations

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

-

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

+

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

-

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

-

Performs the conversion.

-

Performs the conversion.

-

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 +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

+

Performs the conversion.

+

Performs the conversion.

+

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/struct.Board.html b/doc/draught/board/struct.Board.html index b67d4f4..f2fd4c6 100644 --- a/doc/draught/board/struct.Board.html +++ b/doc/draught/board/struct.Board.html @@ -1,102 +1,103 @@ -Board in draught::board - Rust -

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

pub struct Board {
-    cells: Vec<Square>,
-    pub width: usize,
-    pub height: usize,
+Board in draught::board - Rust
+    

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

pub struct Board {
+    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

-

Performs the conversion.

-

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

+

Performs the conversion.

+

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 +

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.

-

The type that holds the reference to Self for the duration of the +

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::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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.BrdIdx.html b/doc/draught/board/struct.BrdIdx.html index 6c27966..1efeabb 100644 --- a/doc/draught/board/struct.BrdIdx.html +++ b/doc/draught/board/struct.BrdIdx.html @@ -1,52 +1,53 @@ -BrdIdx in draught::board - Rust -

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

pub struct BrdIdx {
-    pub row: usize,
-    pub col: usize,
+BrdIdx in draught::board - Rust
+    

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

pub struct BrdIdx {
+    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

-

Performs the conversion.

-

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

+

Performs the conversion.

+

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 +

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.

-

The type that holds the reference to Self for the duration of the +

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::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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.Direction.html b/doc/draught/board/struct.Direction.html index 5a1d718..94b10ff 100644 --- a/doc/draught/board/struct.Direction.html +++ b/doc/draught/board/struct.Direction.html @@ -1,34 +1,35 @@ -Direction in draught::board - Rust -

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

pub struct Direction<T: Clone + Copy> {
-    nw: Option<T>,
-    ne: Option<T>,
-    se: Option<T>,
-    sw: Option<T>,
+Direction in draught::board - Rust
+    

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

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

-

Performs the conversion.

-

Performs the conversion.

-

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.

-
+

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

+

Performs the conversion.

+

Performs the conversion.

+

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.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.Piece.html b/doc/draught/board/struct.Piece.html index 797a503..242046a 100644 --- a/doc/draught/board/struct.Piece.html +++ b/doc/draught/board/struct.Piece.html @@ -1,50 +1,51 @@ -Piece in draught::board - Rust -

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

pub struct Piece {
+Piece in draught::board - Rust
+    

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

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

-

Performs the conversion.

-

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

+

Performs the conversion.

+

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 +

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.

-

The type that holds the reference to Self for the duration of the +

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::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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ No newline at end of file diff --git a/doc/draught/board/struct.Square.html b/doc/draught/board/struct.Square.html index 37d2152..4605190 100644 --- a/doc/draught/board/struct.Square.html +++ b/doc/draught/board/struct.Square.html @@ -1,56 +1,57 @@ -Square in draught::board - Rust -

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

pub struct Square {
-    pub occupant: Option<Piece>,
+Square in draught::board - Rust
+    

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

pub struct Square {
+    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

-

Performs the conversion.

-

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

+

Performs the conversion.

+

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 +

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.

-

The type that holds the reference to Self for the duration of the +

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::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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

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

+

Performs the conversion.

+

Performs the conversion.

+

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

+
🔬 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.

+
\ No newline at end of file diff --git a/doc/draught/comp/index.html b/doc/draught/comp/index.html index f87ebc2..ca414b6 100644 --- a/doc/draught/comp/index.html +++ b/doc/draught/comp/index.html @@ -1,8 +1,9 @@ -draught::comp - Rust -

Module draught::comp[][src]

Expand description

AI player logic

+draught::comp - Rust +

Module draught::comp[][src]

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/struct.BoardNode.html b/doc/draught/comp/struct.BoardNode.html index 36c50a4..e0731f9 100644 --- a/doc/draught/comp/struct.BoardNode.html +++ b/doc/draught/comp/struct.BoardNode.html @@ -1,25 +1,26 @@ -BoardNode in draught::comp - Rust -

Struct draught::comp::BoardNode[][src]

pub struct BoardNode {
+BoardNode in draught::comp - Rust
+    

Struct draught::comp::BoardNode[][src]

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

-

Performs the conversion.

-

Performs the conversion.

-

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.

-
+

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

+

Performs the conversion.

+

Performs the conversion.

+

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.

+
\ No newline at end of file diff --git a/doc/draught/comp/struct.Computer.html b/doc/draught/comp/struct.Computer.html index 1e32183..6f6a815 100644 --- a/doc/draught/comp/struct.Computer.html +++ b/doc/draught/comp/struct.Computer.html @@ -1,32 +1,33 @@ -Computer in draught::comp - Rust -

Struct draught::comp::Computer[][src]

pub struct Computer {
-    pub search_depth: usize,
+Computer in draught::comp - Rust
+    

Struct draught::comp::Computer[][src]

pub struct Computer {
+    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

-

Performs the conversion.

-

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.

-
+

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

+

Performs the conversion.

+

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/comp/struct.Move.html b/doc/draught/comp/struct.Move.html index 9b4e47d..910c877 100644 --- a/doc/draught/comp/struct.Move.html +++ b/doc/draught/comp/struct.Move.html @@ -1,26 +1,27 @@ -Move in draught::comp - Rust -

Struct draught::comp::Move[][src]

pub struct Move {
+Move in draught::comp - Rust
+    

Struct draught::comp::Move[][src]

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

-

Performs the conversion.

-

Performs the conversion.

-

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.

-
+

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

+

Performs the conversion.

+

Performs the conversion.

+

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.

+
\ 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 2d49a7d..b2508c8 100644 --- a/doc/draught/constant.__wasm_bindgen_generated_init_wasm__const.html +++ b/doc/draught/constant.__wasm_bindgen_generated_init_wasm__const.html @@ -1,3 +1,4 @@ -__wasm_bindgen_generated_init_wasm__const in draught - Rust -

Constant draught::__wasm_bindgen_generated_init_wasm__const[][src]

pub(crate) const __wasm_bindgen_generated_init_wasm__const: ();
+__wasm_bindgen_generated_init_wasm__const in draught - Rust +

Constant draught::__wasm_bindgen_generated_init_wasm__const[][src]

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 3cd2640..44ada49 100644 --- a/doc/draught/fn.init_wasm.html +++ b/doc/draught/fn.init_wasm.html @@ -1,3 +1,4 @@ -init_wasm in draught - Rust -

Function draught::init_wasm[][src]

pub fn init_wasm()
+init_wasm in draught - Rust +

Function draught::init_wasm[][src]

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 4e750a8..21cb770 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,3 +1,4 @@ -__wbg_get_game_last_node_count__const in draught::game - Rust -

Constant draught::game::__wbg_get_game_last_node_count__const[][src]

const __wbg_get_game_last_node_count__const: ();
+__wbg_get_game_last_node_count__const in draught::game - Rust +

Constant draught::game::__wbg_get_game_last_node_count__const[][src]

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 ade5abc..a94253c 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,3 +1,4 @@ -__wbg_get_game_perfect_chance__const in draught::game - Rust -

Constant draught::game::__wbg_get_game_perfect_chance__const[][src]

const __wbg_get_game_perfect_chance__const: ();
+__wbg_get_game_perfect_chance__const in draught::game - Rust +

Constant draught::game::__wbg_get_game_perfect_chance__const[][src]

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 01d3072..2c5d37a 100644 --- a/doc/draught/game/index.html +++ b/doc/draught/game/index.html @@ -1,7 +1,8 @@ -draught::game - Rust -

Module draught::game[][src]

Expand description

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

+draught::game - Rust +

Module draught::game[][src]

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/struct.Game.html b/doc/draught/game/struct.Game.html index ef9e962..ed5dc14 100644 --- a/doc/draught/game/struct.Game.html +++ b/doc/draught/game/struct.Game.html @@ -1,73 +1,74 @@ -Game in draught::game - Rust -

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

pub struct Game {
+Game in draught::game - Rust
+    

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

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

-

Performs the conversion.

-

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

+

Performs the conversion.

+

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 +

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 type that holds the reference to Self for the duration of the +

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::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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

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

+

Performs the conversion.

+

Performs the conversion.

+

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 f69e3a1..9f2d29b 100644 --- a/doc/draught/index.html +++ b/doc/draught/index.html @@ -1,5 +1,6 @@ -draught - Rust -

Crate draught[][src]

Expand description

Draught

+draught - Rust +

Crate draught[][src]

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

@@ -11,5 +12,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 abc40ed..5370e1c 100644 --- a/doc/draught/macro.log.html +++ b/doc/draught/macro.log.html @@ -1,7 +1,8 @@ -log in draught - Rust -

Macro draught::log[][src]

macro_rules! log {
+log in draught - Rust
+    

Macro draught::log[][src]

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 288e206..02f815e 100644 --- a/doc/draught/macro.log_error.html +++ b/doc/draught/macro.log_error.html @@ -1,6 +1,7 @@ -log_error in draught - Rust -

Macro draught::log_error[][src]

macro_rules! log_error {
+log_error in draught - Rust
+    

Macro draught::log_error[][src]

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 e4d01c0..b14a7f9 100644 --- a/doc/draught/paint/constant.BLACK_PIECE.html +++ b/doc/draught/paint/constant.BLACK_PIECE.html @@ -1,4 +1,5 @@ -BLACK_PIECE in draught::paint - Rust -

Constant draught::paint::BLACK_PIECE[][src]

const BLACK_PIECE: &str = "#ed0000";
Expand description

Default hex colour value for black pieces

-
+BLACK_PIECE in draught::paint - Rust +

Constant draught::paint::BLACK_PIECE[][src]

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 abb4821..6b8a58c 100644 --- a/doc/draught/paint/constant.BLACK_PIECE_OUTLINE.html +++ b/doc/draught/paint/constant.BLACK_PIECE_OUTLINE.html @@ -1,4 +1,5 @@ -BLACK_PIECE_OUTLINE in draught::paint - Rust -

Constant draught::paint::BLACK_PIECE_OUTLINE[][src]

const BLACK_PIECE_OUTLINE: &str = "#a60000";
Expand description

Default hex colour value for black piece outline

-
+BLACK_PIECE_OUTLINE in draught::paint - Rust +

Constant draught::paint::BLACK_PIECE_OUTLINE[][src]

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 d9a0ba9..17cca69 100644 --- a/doc/draught/paint/constant.BLACK_SQUARE.html +++ b/doc/draught/paint/constant.BLACK_SQUARE.html @@ -1,4 +1,5 @@ -BLACK_SQUARE in draught::paint - Rust -

Constant draught::paint::BLACK_SQUARE[][src]

const BLACK_SQUARE: &str = "#000000";
Expand description

Default hex colour value for black square background

-
+BLACK_SQUARE in draught::paint - Rust +

Constant draught::paint::BLACK_SQUARE[][src]

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 eaad6e6..ec6abc2 100644 --- a/doc/draught/paint/constant.DRAW_OUTLINE.html +++ b/doc/draught/paint/constant.DRAW_OUTLINE.html @@ -1,4 +1,5 @@ -DRAW_OUTLINE in draught::paint - Rust -

Constant draught::paint::DRAW_OUTLINE[][src]

const DRAW_OUTLINE: bool = true;
Expand description

Whether to outline black squares

-
+DRAW_OUTLINE in draught::paint - Rust +

Constant draught::paint::DRAW_OUTLINE[][src]

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 2903e69..004fe86 100644 --- a/doc/draught/paint/constant.DRAW_PIECE_OUTLINES.html +++ b/doc/draught/paint/constant.DRAW_PIECE_OUTLINES.html @@ -1,4 +1,5 @@ -DRAW_PIECE_OUTLINES in draught::paint - Rust -

Constant draught::paint::DRAW_PIECE_OUTLINES[][src]

const DRAW_PIECE_OUTLINES: bool = true;
Expand description

Whether to outline pieces

-
+DRAW_PIECE_OUTLINES in draught::paint - Rust +

Constant draught::paint::DRAW_PIECE_OUTLINES[][src]

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 731e288..150545f 100644 --- a/doc/draught/paint/constant.KING_OUTLINE.html +++ b/doc/draught/paint/constant.KING_OUTLINE.html @@ -1,4 +1,5 @@ -KING_OUTLINE in draught::paint - Rust -

Constant draught::paint::KING_OUTLINE[][src]

const KING_OUTLINE: &str = "#ffea00";
Expand description

Default hex colour value for black piece outline

-
+KING_OUTLINE in draught::paint - Rust +

Constant draught::paint::KING_OUTLINE[][src]

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 b107f85..baf37f7 100644 --- a/doc/draught/paint/constant.OUTLINE_WIDTH.html +++ b/doc/draught/paint/constant.OUTLINE_WIDTH.html @@ -1,4 +1,5 @@ -OUTLINE_WIDTH in draught::paint - Rust -

Constant draught::paint::OUTLINE_WIDTH[][src]

const OUTLINE_WIDTH: f64 = 0.05;
Expand description

Line width when outlining black squares as proportion of min cell dimension

-
+OUTLINE_WIDTH in draught::paint - Rust +

Constant draught::paint::OUTLINE_WIDTH[][src]

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 fd81cfd..ee9a4d3 100644 --- a/doc/draught/paint/constant.PIECE_OUTLINE_PROPORTION.html +++ b/doc/draught/paint/constant.PIECE_OUTLINE_PROPORTION.html @@ -1,4 +1,5 @@ -PIECE_OUTLINE_PROPORTION in draught::paint - Rust -

Constant draught::paint::PIECE_OUTLINE_PROPORTION[][src]

const PIECE_OUTLINE_PROPORTION: f64 = 0.25;
Expand description

Line width for outlining pieces as proportion of piece radius

-
+PIECE_OUTLINE_PROPORTION in draught::paint - Rust +

Constant draught::paint::PIECE_OUTLINE_PROPORTION[][src]

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 c9dac32..9ba76b0 100644 --- a/doc/draught/paint/constant.PIECE_PROPORTION.html +++ b/doc/draught/paint/constant.PIECE_PROPORTION.html @@ -1,4 +1,5 @@ -PIECE_PROPORTION in draught::paint - Rust -

Constant draught::paint::PIECE_PROPORTION[][src]

const PIECE_PROPORTION: f64 = 0.6;
Expand description

Proportion of square that piece fills as proportion of min cell dimension

-
+PIECE_PROPORTION in draught::paint - Rust +

Constant draught::paint::PIECE_PROPORTION[][src]

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 7ad1900..e72eb3a 100644 --- a/doc/draught/paint/constant.SELECTED_PIECE.html +++ b/doc/draught/paint/constant.SELECTED_PIECE.html @@ -1,4 +1,5 @@ -SELECTED_PIECE in draught::paint - Rust -

Constant draught::paint::SELECTED_PIECE[][src]

const SELECTED_PIECE: &str = "#fffd78";
Expand description

Default hex colour value for selected piece

-
+SELECTED_PIECE in draught::paint - Rust +

Constant draught::paint::SELECTED_PIECE[][src]

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 e9f3190..af6ce21 100644 --- a/doc/draught/paint/constant.SELECTED_PIECE_OUTLINE.html +++ b/doc/draught/paint/constant.SELECTED_PIECE_OUTLINE.html @@ -1,4 +1,5 @@ -SELECTED_PIECE_OUTLINE in draught::paint - Rust -

Constant draught::paint::SELECTED_PIECE_OUTLINE[][src]

const SELECTED_PIECE_OUTLINE: &str = "#d1cf45";
Expand description

Default hex colour value for selected piece outline

-
+SELECTED_PIECE_OUTLINE in draught::paint - Rust +

Constant draught::paint::SELECTED_PIECE_OUTLINE[][src]

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 a7c46c9..3f3f15e 100644 --- a/doc/draught/paint/constant.SQUARE_OUTLINE.html +++ b/doc/draught/paint/constant.SQUARE_OUTLINE.html @@ -1,4 +1,5 @@ -SQUARE_OUTLINE in draught::paint - Rust -

Constant draught::paint::SQUARE_OUTLINE[][src]

const SQUARE_OUTLINE: &str = "#9c9c9c";
Expand description

Default hex colour value for outline of black squares

-
+SQUARE_OUTLINE in draught::paint - Rust +

Constant draught::paint::SQUARE_OUTLINE[][src]

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 a02e3b1..6916117 100644 --- a/doc/draught/paint/constant.WHITE_PIECE.html +++ b/doc/draught/paint/constant.WHITE_PIECE.html @@ -1,4 +1,5 @@ -WHITE_PIECE in draught::paint - Rust -

Constant draught::paint::WHITE_PIECE[][src]

const WHITE_PIECE: &str = "#dbdbdb";
Expand description

Default hex colour value for white pieces

-
+WHITE_PIECE in draught::paint - Rust +

Constant draught::paint::WHITE_PIECE[][src]

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 95b03b3..3989e42 100644 --- a/doc/draught/paint/constant.WHITE_PIECE_OUTLINE.html +++ b/doc/draught/paint/constant.WHITE_PIECE_OUTLINE.html @@ -1,4 +1,5 @@ -WHITE_PIECE_OUTLINE in draught::paint - Rust -

Constant draught::paint::WHITE_PIECE_OUTLINE[][src]

const WHITE_PIECE_OUTLINE: &str = "#9c9c9c";
Expand description

Default hex colour value for white piece outline

-
+WHITE_PIECE_OUTLINE in draught::paint - Rust +

Constant draught::paint::WHITE_PIECE_OUTLINE[][src]

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 8bb1d1b..ff620d1 100644 --- a/doc/draught/paint/constant.WHITE_SQUARE.html +++ b/doc/draught/paint/constant.WHITE_SQUARE.html @@ -1,4 +1,5 @@ -WHITE_SQUARE in draught::paint - Rust -

Constant draught::paint::WHITE_SQUARE[][src]

const WHITE_SQUARE: &str = "#FFFFFF";
Expand description

Default hex colour value for white square background

-
+WHITE_SQUARE in draught::paint - Rust +

Constant draught::paint::WHITE_SQUARE[][src]

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 4114f8b..7e2829e 100644 --- a/doc/draught/paint/index.html +++ b/doc/draught/paint/index.html @@ -1,5 +1,6 @@ -draught::paint - Rust -

Module draught::paint[][src]

Expand description

Components for painting board states onto HTML canvases

+draught::paint - Rust +

Module draught::paint[][src]

Expand description

Components for painting board states onto HTML canvases

Structs

Used to paint boards onto HTML canvases

Constants

@@ -18,5 +19,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/struct.Painter.html b/doc/draught/paint/struct.Painter.html index f34d01d..2c5478b 100644 --- a/doc/draught/paint/struct.Painter.html +++ b/doc/draught/paint/struct.Painter.html @@ -1,8 +1,9 @@ -Painter in draught::paint - Rust -

Struct draught::paint::Painter[][src]

pub struct Painter {
Show 19 fields +Painter in draught::paint - Rust +

Struct draught::paint::Painter[][src]

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, @@ -12,59 +13,59 @@ 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

-

Performs the conversion.

-

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

+

Performs the conversion.

+

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 +

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 type that holds the reference to Self for the duration of the +

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::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

-

Performs the conversion.

-

Performs the conversion.

-

Same as IntoWasmAbi::Abi

-

Same as IntoWasmAbi::into_abi, except that it may throw and never +

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

+

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

+

Performs the conversion.

+

Performs the conversion.

+

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/utils/fn.set_panic_hook.html b/doc/draught/utils/fn.set_panic_hook.html index f0923a3..c718a95 100644 --- a/doc/draught/utils/fn.set_panic_hook.html +++ b/doc/draught/utils/fn.set_panic_hook.html @@ -1,3 +1,4 @@ -set_panic_hook in draught::utils - Rust -

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

pub fn set_panic_hook()
+set_panic_hook in draught::utils - Rust +

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

pub fn set_panic_hook()
\ No newline at end of file diff --git a/doc/draught/utils/index.html b/doc/draught/utils/index.html index 651e3a0..f4e9ff2 100644 --- a/doc/draught/utils/index.html +++ b/doc/draught/utils/index.html @@ -1,4 +1,5 @@ -draught::utils - Rust -

Module draught::utils[][src]

Functions

-
+draught::utils - Rust +
\ 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 16441b7..1581d8e 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 + 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 a14a501..88e654f 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 bcf5c22..d1c4136 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 965b3d0..de6bf55 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 c87d20c..456b7dd 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 fc048d8..a05e094 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 d78b63d..c500b6f 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 eb69457..f3000f9 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 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 4608eed..58edcef 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 0584eeb..e00f34f 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 7c028a8..4be1085 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 ec800b5..e2f91e9 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 82f27b4..e714bf1 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 eda5986..c282d6e 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 b09ba67..924ef91 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 e905896..ba479be 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 5d93285..f9ee910 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:#D5D5D5;}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{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.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:#b4d1b9;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#ffc891;}a.result-foreigntype:focus{background-color:#f5c4ff;}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:#c3e0ff;}a.result-primitive:focus{background-color:#9aecff;}a.result-keyword:focus{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a.srclink,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar 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{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.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;}.since{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:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:#FDFFD3;}:target{border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.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:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#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;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file + 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{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{background-color:#fff;}.source .sidebar{background-color:#f1f1f1;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#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;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a.srclink,a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar 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{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.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;}.since{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-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#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;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.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;} \ No newline at end of file diff --git a/doc/main.js b/doc/main.js index 082b6de..02d5935 100644 --- a/doc/main.js +++ b/doc/main.js @@ -1,8 +1,8 @@ -if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value;window.searchIndexJS=rustdocVars.attributes["data-search-index-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=["ayu","dark","light"];function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var 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(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});if(search_input.value!=''){loadSearch()}searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();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){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var 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;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_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);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i .in-band > .trait").textContent;var baseIdName="impl-"+traitName+"-";var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;i summary:not(.hideme)"),function(el){el.addEventListener("click",function(e){if(e.target.tagName!="SUMMARY"&&e.target.tagName!="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),function(e){e.onclick=function(){this.getElementsByClassName('notable-traits-tooltiptext')[0].classList.toggle("force-tooltip")}});var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")){hideSidebar()}else{showSidebar()}}}var buildHelperPopup=function(){var popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",function(ev){if(ev.target===popup){displayHelp(false,ev)}});var book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVar(name){var 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(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");window.searchJS=resourcePath("search",".js");window.searchIndexJS=resourcePath("search-index",".js");var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";var MAIN_ID="main-content";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=getVar("themes").split(",");function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var 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(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});if(search_input.value!=''){loadSearch()}searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById(MAIN_ID);var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();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){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var 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;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_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);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i .in-band > .trait").textContent;var baseIdName="impl-"+traitName+"-";var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;i summary:not(.hideme)"),function(el){el.addEventListener("click",function(e){if(e.target.tagName!="SUMMARY"&&e.target.tagName!="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),function(e){e.onclick=function(){this.getElementsByClassName('notable-traits-tooltiptext')[0].classList.toggle("force-tooltip")}});var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")){hideSidebar()}else{showSidebar()}}}var buildHelperPopup=function(){var popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",function(ev){if(ev.target===popup){displayHelp(false,ev)}});var book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ the rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"
"+x[0].split(" ").map(function(y,index){return(index&1)===0?""+y+"":" "+y+" "}).join("")+"
"+x[1]+"
"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

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

"+x+"

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

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc 1.58.1 (db9d1b20b 2022-01-20)";rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,searchState.outputElement());buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var 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';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(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(function(x){return"

"+x+"

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

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var 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=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var 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';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(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 a4ce2bb..8ad8864 100644 --- a/doc/noscript.css +++ b/doc/noscript.css @@ -1 +1 @@ - #main .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;}#theme-picker{display:none;} \ No newline at end of file diff --git a/doc/rustdoc.css b/doc/rustdoc.css index e7788fd..4d3b1e9 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"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2"),url("SourceSerif4-Regular.ttf.woff") format("woff");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"),url("SourceSerif4-It.ttf.woff") format("woff");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"),url("SourceSerif4-Bold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2"),url("SourceCodePro-Regular.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2"),url("SourceCodePro-It.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),url("SourceCodePro-Semibold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2"),url("NanumBarunGothic.ttf.woff") format("woff");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:16px/1.4 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3,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{display:flex;border-bottom:1px dashed;margin-top:0;padding-left:1px;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,.top-doc h3,.top-doc h4,.sidebar .others h3{border-bottom:1px solid;}h3.code-header{font-size:1.1em;}h4.code-header{font-size:1em;}h3.code-header,h4.code-header{font-weight:600;border-bottom-style:none;padding:0;margin:0;}.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;margin-top:16px;margin-bottom:10px;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,div.item-list .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>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}.content ul.crate a.crate{font-size:16px/1.6;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}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.1em;}.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{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow-y:scroll;}.rustdoc.source .sidebar{overflow-y:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;height:100%;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;font-weight:inherit;padding:0;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.location a:hover{text-decoration:underline;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;font-weight:inherit;padding:0;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .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;}.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{margin-left:230px;position:relative;}#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: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.3em;}.top-doc .docblock h3{font-size:1.15em;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.1em;}.top-doc .docblock h6{font-size:1em;}.docblock h5{font-size:1em;}.docblock h6{font-size:0.95em;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;text-align:right;font-size:23px;margin:0px;padding:0 0 0 12px;font-weight:normal;}.method>.code-header,.trait-impl>.code-header,.invisible>.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:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);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:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits):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;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header{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):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,.method>.code-header+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.2rem;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results{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:18px;}#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:table;}.stab{padding:3px;margin-bottom:5px;font-size:90%;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.2em;}.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:80%;line-height:1.2;margin-bottom:0;margin-left:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.impl-items .since,.impl .since,.methods .since{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-size:17px;font-weight:normal;}.rightside{float:right;}.has-srclink{font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.code-attribute{font-weight:300;}.since+.srclink{padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}h3.variant{font-weight:600;font-size:1.1em;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1em;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;}.top-doc .docblock>.section-header:first-child{margin-left:15px;}.top-doc .docblock>.section-header:first-child:hover>a:before{left:-10px;}.docblock>.section-header:first-child{margin-top:0;}: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:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:19px;font-weight:600;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;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:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,#help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:17px;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);}#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;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}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:17px;height:max(17px,1.1em);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:16px;}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:3px;}.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.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:17px;height:max(17px,1.1em);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;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;top:45px;bottom:0;width:246px;left:-246px;overflow-y:auto;border-right:1px solid;}.sidebar>.block.version{overflow:hidden;border-bottom:none;margin-bottom:0;height:100%;padding-left:12px;}.sidebar>.block.version>div.narrow-helper{float:left;width:1px;height:100%;}.sidebar>.block.version>p{margin:0;min-width:55px;display:flex;align-items:center;height:100%;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}#search{margin-left:0;}.anchor{display:none !important;}.theme-picker{left:10px;top:54px;z-index:1;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it,.sidebar-elems:focus-within{z-index:2;left:0;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main>details.rustdoc-toggle>summary::before,#main>div>details.rustdoc-toggle>summary::before{left:-11px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-container>div{width:calc(100% - 32px);}.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;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:anywhere;}}.scraped-example-title{font-family:'Fira Sans';}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow:hidden;max-height:240px;}.scraped-example:not(.expanded) .code-wrapper .example-wrap pre.rust{overflow-y:hidden;max-height:240px;padding-bottom:0;}.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 .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper{overflow:hidden;max-height:240px;}.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 .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.more-examples-toggle{margin-top:10px;}.more-examples-toggle summary{color:#999;font-family:'Fira Sans';}.more-scraped-examples{margin-left:25px;display:flex;flex-direction:row;width:calc(100% - 25px);}.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:hover .toggle-line-inner{background:#aaa;}.toggle-line-inner{min-width:2px;background:#ddd;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;}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);} \ 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"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2"),url("SourceSerif4-Regular.ttf.woff") format("woff");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"),url("SourceSerif4-It.ttf.woff") format("woff");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"),url("SourceSerif4-Bold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2"),url("SourceCodePro-Regular.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2"),url("SourceCodePro-It.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),url("SourceCodePro-Semibold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2"),url("NanumBarunGothic.ttf.woff") format("woff");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.4 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;-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.4rem;}h3{font-size:1.3rem;}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{display:flex;border-bottom:1px dashed;margin-top:0;padding-left:1px;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,.top-doc h3,.top-doc h4,.sidebar .others h3{border-bottom:1px solid;}h3.code-header{font-size:1.1rem;}h4.code-header{font-size:1rem;}h3.code-header,h4.code-header{font-weight:600;border-bottom-style:none;padding:0;margin:0;}.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;margin-top:16px;margin-bottom:10px;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,div.item-list .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;}.content ul.crate a.crate{font-size:1rem/1.6;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}.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.1em;}.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;text-transform:uppercase;}.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{width:200px;overflow-y:scroll;position:sticky;min-width:200px;height:100vh;top:0;left:0;}.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(:first-child){transition:opacity 0.5s,visibility 0.2s;opacity:0;visibility:hidden;}.source .sidebar.expanded{overflow-y:auto;}.source .sidebar.expanded>*{opacity:1;visibility:visible;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.hidden{display:none !important;}.logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.logo-container>img{height:100px;width:100px;}.sidebar .location{border:1px solid;font-size:1.0625rem;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;font-weight:inherit;padding:0;}.sidebar .version{font-size:0.9375rem;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.location a:hover{text-decoration:underline;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:0.875rem;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:1.0625rem;margin-bottom:5px;font-weight:inherit;padding:0;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{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;}.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: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.3rem;}.top-doc .docblock h3{font-size:1.15rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.1rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.95rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;text-align:right;font-size:1.4375rem;margin:0px;padding:0 0 0 12px;font-weight:normal;}.method>.code-header,.trait-impl>.code-header,.invisible>.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: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.1rem;}.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.8rem;}.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;}.content .item-info code{font-size:0.81rem;}.content .item-info{position:relative;margin-left:33px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:1.5625rem;position:absolute;top:-6px;left:-19px;}.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;}nav:not(.sidebar){flex-grow:1;border-bottom:1px solid;padding-bottom:10px;margin-bottom:25px;}.source nav:not(.sidebar).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):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,.method>.code-header+.srclink{position:absolute;top:0;right:0;font-size:1.0625rem;font-weight:normal;}.block a.current.crate{font-weight:500;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.2rem;}.search-container{position:relative;max-width:960px;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:1.0625rem;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results{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:table;}.stab{padding:3px;margin-bottom:5px;font-size:0.9rem;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.2rem;}.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.8rem;line-height:1.2;margin-bottom:0;margin-left:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.impl-items .since,.impl .since,.methods .since{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.impl .srclink{font-size:1.0625rem;}.rightside{float:right;}.has-srclink{font-size:1rem;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.3rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.code-attribute{font-weight:300;}.since+.srclink{padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;margin-right:5px;}h3.variant{font-weight:600;font-size:1.1rem;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;}.top-doc .docblock>.section-header:first-child{margin-left:15px;}.top-doc .docblock>.section-header:first-child:hover>a:before{left:-10px;}.docblock>.section-header:first-child{margin-top:0;}: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;}.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: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;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:sticky;top:0;left:0;cursor:pointer;font-weight:bold;font-size:1.2rem;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:-34px;top:9px;}.theme-picker button{outline:none;}#settings-menu,#help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:4px;font-size:16px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:16px;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);}#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;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size: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.1875rem;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:1.0625rem;}.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.7rem;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:17px;height:max(17px,1.1em);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:3px;}.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:17px;height:max(17px,1.1em);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;}.rustdoc.source .sidebar{transition:width .5s;}.source .sidebar.expanded{width:300px;}}@media (max-width:700px){body{padding-top:0px;}main{padding-left:15px;padding-top:0px;}.rustdoc{flex-direction:column;}.rustdoc:not(.source)>.sidebar{width:100%;height:45px;min-height:40px;max-height:45px;margin:0;padding:0 15px;position:static;z-index:11;overflow-y:hidden;}.rustdoc.source>.sidebar{position:fixed;top:0;left:0;margin:0;z-index:11;width:0;}.sidebar.mobile{position:sticky !important;top:0;left:0;width:100%;margin-left:0;background-color:rgba(0,0,0,0);}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:1.5rem;}.sidebar .location:empty{padding:0;}.rustdoc:not(.source) .sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;top:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;top:45px;bottom:0;width:246px;left:-246px;overflow-y:auto;border-right:1px solid;}.sidebar>.block.version{overflow:hidden;border-bottom:none;margin-bottom:0;height:100%;padding-left:12px;}.sidebar>.block.version>div.narrow-helper{float:left;width:1px;height:100%;}.sidebar>.block.version>p{margin:0;min-width:55px;display:flex;align-items:center;height:100%;}nav.sub{width:calc(100% - 32px);margin-left:32px;margin-bottom:10px;}.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;}.theme-picker{z-index:1;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.show-it,.sidebar-elems:focus-within{z-index:2;left:0;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:1.3125rem;}#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;}#all-types{margin:10px;}.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-container>div{width:calc(100% - 32px);}.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%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}.docblock code{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;}}.scraped-example-title{font-family:'Fira Sans';}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow:hidden;max-height:240px;}.scraped-example:not(.expanded) .code-wrapper .example-wrap pre.rust{overflow-y:hidden;max-height:240px;padding-bottom:0;}.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 .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper{overflow:hidden;max-height:240px;}.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 .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.more-examples-toggle{margin-top:10px;}.more-examples-toggle summary{color:#999;font-family:'Fira Sans';}.more-scraped-examples{margin-left:25px;display:flex;flex-direction:row;width:calc(100% - 25px);}.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:hover .toggle-line-inner{background:#aaa;}.toggle-line-inner{min-width:2px;background:#ddd;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.js b/doc/search.js index 6f612fa..eb6d6f7 100644 --- a/doc/search.js +++ b/doc/search.js @@ -1 +1 @@ -(function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}}}else if(literalSearch){if((!val.generics||val.generics.length===0)&&obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(gen){return gen[NAME]===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev,j;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(typePassesFilter(typeFilter,ty.ty)&&(index!==-1||lev<=MAX_LEV_DISTANCE)){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var 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){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var duplicates={};var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var 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);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{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){var search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var 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}}var output="

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

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
";var 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;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}function tokenizeQuery(raw){var i,matched;var l=raw.length;var depth=0;var nextAngle=/(<|>)/g;var ret=[];var start=0;for(i=0;i'){depth+=1}break;case">":if(depth>0){depth-=1}break;case",":if(depth===0){ret.push(raw.substring(start,i));start=i+1}break}}if(start!==i){ret.push(raw.substring(start,i))}return ret}var queries=tokenizeQuery(query.raw);var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates),params.go_to_first)}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() \ No newline at end of file +(function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i-1){var obj=searchIndex[result.id];obj.lev=result.lev;var 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){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){var 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(function(aaa,bbb){var a,b;a=(aaa.word!==val);b=(bbb.word!==val);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});for(var i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}}}else if(literalSearch){var found=false;if((!val.generics||val.generics.length===0)&&obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){found=obj[GENERICS_DATA].some(function(gen){return gen[NAME]===val.name})}return found?0:MAX_LEV_DISTANCE+1}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}function addIntoResults(isExact,res,fullId,id,index,lev){if(lev===0||(!isExact&&lev<=MAX_LEV_DISTANCE)){if(res[fullId]!==undefined){var result=res[fullId];if(result.dontValidate||result.lev<=lev){return}}res[fullId]={id:id,index:index,dontValidate:isExact,lev:lev,}}}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i0){firstNonZeroDistance=distance;break}}in_args=firstNonZeroDistance}addIntoResults(true,results_in_args,fullId,i,-1,in_args);addIntoResults(true,results_returned,fullId,i,-1,returned);if(is_module){addIntoResults(true,results,fullId,i,-1,0)}}}query.inputs=inputs.map(function(input){return input.name});query.output=output.name}else{query.inputs=[val];query.output=val;query.search=val;val=val.replace(/_/g,"");var valGenerics=extractGenerics(val);var paths=valLower.split("::");removeEmptyStringsFromArray(paths);val=paths[paths.length-1];var contains=paths.slice(0,paths.length>1?paths.length-1:1);var lev,j;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}addIntoResults(false,results_in_args,fullId,j,index,in_args);addIntoResults(false,results_returned,fullId,j,index,returned);if(typePassesFilter(typeFilter,ty.ty)&&(index!==-1||lev<=MAX_LEV_DISTANCE)){if(index!==-1&&paths.length<2){lev=0}addIntoResults(false,results,fullId,j,index,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type="",query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var 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){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var 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);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{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){var search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query,true);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var 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}}var output="

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

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
";var 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;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}function tokenizeQuery(raw){var i,matched;var l=raw.length;var depth=0;var nextAngle=/(<|>)/g;var ret=[];var start=0;for(i=0;i'){depth+=1}break;case">":if(depth>0){depth-=1}break;case",":if(depth===0){ret.push(raw.substring(start,i));start=i+1}break}}if(start!==i){ret.push(raw.substring(start,i))}return ret}var queries=tokenizeQuery(query.raw);var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,searchWords,filterCrates),params["go_to_first"])}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;var crateCorpus=rawSearchIndex[crate];searchWords.push(crate);var 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;var itemTypes=crateCorpus.t;var itemNames=crateCorpus.n;var itemPaths=crateCorpus.q;var itemDescs=crateCorpus.d;var itemParentIdxs=crateCorpus.i;var itemFunctionSearchTypes=crateCorpus.f;var paths=crateCorpus.p;var aliases=crateCorpus.a;var 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]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}searchWords=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() \ No newline at end of file diff --git a/doc/settings.html b/doc/settings.html index 20fc315..2c77b21 100644 --- a/doc/settings.html +++ b/doc/settings.html @@ -1,4 +1,5 @@ -Rustdoc settings -

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
-
Auto-hide item contents for large items.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
+Rustdoc settings +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item contents for large items.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/doc/source-script.js b/doc/source-script.js index 5dc8fee..09515e0 100644 --- a/doc/source-script.js +++ b/doc/source-script.js @@ -1 +1 @@ -(function(){function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}var lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(scrollTo,match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(tocur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",function(){var match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(false,match)}});onEachLazy(document.getElementsByClassName("line-numbers"),function(el){el.addEventListener("click",handleSourceHighlight)});highlightSourceLines(true);window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file +(function(){function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.classList.add("expanded");child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.classList.remove("expanded");child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner=document.createElement("div");if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}var container=document.querySelector("nav.sidebar");var sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){container.classList.remove("expanded")}else{container.classList.add("expanded")}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});container.insertBefore(sidebar,document.querySelector(".sidebar-logo").nextSibling);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}var lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(scrollTo,match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(tocur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",function(){var match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(false,match)}});onEachLazy(document.getElementsByClassName("line-numbers"),function(el){el.addEventListener("click",handleSourceHighlight)});highlightSourceLines(true);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 ae482d1..c3bbb9a 100644 --- a/doc/src/draught/board/enums.rs.html +++ b/doc/src/draught/board/enums.rs.html @@ -1,5 +1,6 @@ -enums.rs - source -
 1
+enums.rs - source
+    
 1
  2
  3
  4
@@ -171,5 +172,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 5ddfb32..a2294ae 100644 --- a/doc/src/draught/board/iter.rs.html +++ b/doc/src/draught/board/iter.rs.html @@ -1,5 +1,6 @@ -iter.rs - source -
  1
+iter.rs - source
+    
  1
   2
   3
   4
@@ -389,5 +390,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 4b1aa91..5076f7f 100644 --- a/doc/src/draught/board/mod.rs.html +++ b/doc/src/draught/board/mod.rs.html @@ -1,5 +1,6 @@ -mod.rs - source -
  1
+mod.rs - source
+    
  1
   2
   3
   4
@@ -1699,5 +1700,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 17c6ceb..0f777d5 100644 --- a/doc/src/draught/comp/mod.rs.html +++ b/doc/src/draught/comp/mod.rs.html @@ -1,5 +1,6 @@ -mod.rs - source -
  1
+mod.rs - source
+    
  1
   2
   3
   4
@@ -849,5 +850,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 1e434b8..f9babfa 100644 --- a/doc/src/draught/game/mod.rs.html +++ b/doc/src/draught/game/mod.rs.html @@ -1,5 +1,6 @@ -mod.rs - source -
  1
+mod.rs - source
+    
  1
   2
   3
   4
@@ -502,5 +503,5 @@
     }
 }
 
-
+
\ No newline at end of file diff --git a/doc/src/draught/lib.rs.html b/doc/src/draught/lib.rs.html index eacf766..bedb799 100644 --- a/doc/src/draught/lib.rs.html +++ b/doc/src/draught/lib.rs.html @@ -1,5 +1,6 @@ -lib.rs - source -
 1
+lib.rs - source
+    
 1
  2
  3
  4
@@ -85,5 +86,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 6e2c079..06313ae 100644 --- a/doc/src/draught/paint.rs.html +++ b/doc/src/draught/paint.rs.html @@ -1,5 +1,6 @@ -paint.rs - source -
  1
+paint.rs - source
+    
  1
   2
   3
   4
@@ -781,5 +782,5 @@
         }
     }
 }
-
+
\ No newline at end of file diff --git a/doc/src/draught/utils.rs.html b/doc/src/draught/utils.rs.html index e37329a..4631ea7 100644 --- a/doc/src/draught/utils.rs.html +++ b/doc/src/draught/utils.rs.html @@ -1,5 +1,6 @@ -utils.rs - source -
 1
+utils.rs - source
+    
 1
  2
  3
  4
@@ -20,5 +21,5 @@
     console_error_panic_hook::set_once();
 }
 
-
+
\ No newline at end of file diff --git a/doc/storage.js b/doc/storage.js index 6b16cbd..dd18db8 100644 --- a/doc/storage.js +++ b/doc/storage.js @@ -1 +1 @@ -var resourcesSuffix="";var darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file +var darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file