12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- CSS -->
- <title>akane</title>
- <style type="text/css" >
- /*
- Stylesheet for use with Docutils/rst2html.
- See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
- customize this style sheet.
- Modified from Chad Skeeters' rst2html-style
- https://bitbucket.org/cskeeters/rst2html-style/
- Modified by Boyd Greenfield and narimiran
- */
- html {
- font-size: 100%;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%; }
- body {
- font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
- font-weight: 400;
- font-size: 1.125em;
- line-height: 1.5;
- color: #222;
- background-color: #FCFCFC; }
- /* Skeleton grid */
- .container {
- position: relative;
- width: 100%;
- max-width: 1050px;
- margin: 0 auto;
- padding: 0;
- box-sizing: border-box; }
- .column,
- .columns {
- width: 100%;
- float: left;
- box-sizing: border-box;
- margin-left: 1%;
- }
- .column:first-child,
- .columns:first-child {
- margin-left: 0; }
- .three.columns {
- width: 19%; }
- .nine.columns {
- width: 80.0%; }
- .twelve.columns {
- width: 100%;
- margin-left: 0; }
- @media screen and (max-width: 860px) {
- .three.columns {
- display: none;
- }
- .nine.columns {
- width: 98.0%;
- }
- body {
- font-size: 1em;
- line-height: 1.35;
- }
- }
- cite {
- font-style: italic !important; }
- /* Nim search input */
- div#searchInputDiv {
- margin-bottom: 1em;
- }
- input#searchInput {
- width: 80%;
- }
- /*
- * Some custom formatting for input forms.
- * This also fixes input form colors on Firefox with a dark system theme on Linux.
- */
- input {
- -moz-appearance: none;
- color: #333;
- background-color: #f8f8f8;
- border: 1px solid #aaa;
- font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
- font-size: 0.9em;
- padding: 6px;
- }
- input:focus {
- border: 1px solid #1fa0eb;
- box-shadow: 0 0 2px #1fa0eb;
- }
- /* Docgen styles */
- /* Links */
- a {
- color: #07b;
- text-decoration: none;
- }
- a span.Identifier {
- text-decoration: underline;
- text-decoration-color: #aab;
- }
- a.reference-toplevel {
- font-weight: bold;
- }
- a.toc-backref {
- text-decoration: none;
- color: #222; }
- a.link-seesrc {
- color: #607c9f;
- font-size: 0.9em;
- font-style: italic; }
- a:hover,
- a:focus {
- color: #607c9f;
- text-decoration: underline; }
- a:hover span.Identifier {
- color: #607c9f;
- }
- sub,
- sup {
- position: relative;
- font-size: 75%;
- line-height: 0;
- vertical-align: baseline; }
- sup {
- top: -0.5em; }
- sub {
- bottom: -0.25em; }
- img {
- width: auto;
- height: auto;
- max-width: 100%;
- vertical-align: middle;
- border: 0;
- -ms-interpolation-mode: bicubic; }
- @media print {
- * {
- color: black !important;
- text-shadow: none !important;
- background: transparent !important;
- box-shadow: none !important; }
- a,
- a:visited {
- text-decoration: underline; }
- a[href]:after {
- content: " (" attr(href) ")"; }
- abbr[title]:after {
- content: " (" attr(title) ")"; }
- .ir a:after,
- a[href^="javascript:"]:after,
- a[href^="#"]:after {
- content: ""; }
- pre,
- blockquote {
- border: 1px solid #999;
- page-break-inside: avoid; }
- thead {
- display: table-header-group; }
- tr,
- img {
- page-break-inside: avoid; }
- img {
- max-width: 100% !important; }
- @page {
- margin: 0.5cm; }
- h1 {
- page-break-before: always; }
- h1.title {
- page-break-before: avoid; }
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3; }
- h2,
- h3 {
- page-break-after: avoid; }
- }
- p {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- small {
- font-size: 85%; }
- strong {
- font-weight: 600;
- font-size: 0.95em;
- color: #3c3c3c;
- }
- em {
- font-style: italic; }
- h1 {
- font-size: 1.8em;
- font-weight: 400;
- padding-bottom: .25em;
- border-bottom: 1px solid #aaa;
- margin-top: 2.5em;
- margin-bottom: 1em;
- line-height: 1.2em; }
- h1.title {
- padding-bottom: 1em;
- border-bottom: 0px;
- font-size: 2.5em;
- text-align: center;
- font-weight: 900;
- margin-top: 0.75em;
- margin-bottom: 0em;
- }
- h2 {
- font-size: 1.3em;
- margin-top: 2em; }
- h2.subtitle {
- text-align: center; }
- h3 {
- font-size: 1.125em;
- font-style: italic;
- margin-top: 1.5em; }
- h4 {
- font-size: 1.125em;
- margin-top: 1em; }
- h5 {
- font-size: 1.125em;
- margin-top: 0.75em; }
- h6 {
- font-size: 1.1em; }
- ul,
- ol {
- padding: 0;
- margin-top: 0.5em;
- margin-left: 0.75em; }
- ul ul,
- ul ol,
- ol ol,
- ol ul {
- margin-bottom: 0;
- margin-left: 1.25em; }
- li {
- list-style-type: circle;
- }
- ul.simple-boot li {
- list-style-type: none;
- margin-left: 0em;
- margin-bottom: 0.5em;
- }
- ol.simple > li, ul.simple > li {
- margin-bottom: 0.25em;
- margin-left: 0.4em }
- ul.simple.simple-toc > li {
- margin-top: 1em;
- }
- ul.simple-toc {
- list-style: none;
- font-size: 0.9em;
- margin-left: -0.3em;
- margin-top: 1em; }
- ul.simple-toc > li {
- list-style-type: none;
- }
- ul.simple-toc-section {
- list-style-type: circle;
- margin-left: 1em;
- color: #6c9aae; }
- ol.arabic {
- list-style: decimal; }
- ol.loweralpha {
- list-style: lower-alpha; }
- ol.upperalpha {
- list-style: upper-alpha; }
- ol.lowerroman {
- list-style: lower-roman; }
- ol.upperroman {
- list-style: upper-roman; }
- ul.auto-toc {
- list-style-type: none; }
- dl {
- margin-bottom: 1.5em; }
- dt {
- margin-bottom: -0.5em;
- margin-left: 0.0em; }
- dd {
- margin-left: 2.0em;
- margin-bottom: 3.0em;
- margin-top: 0.5em; }
- hr {
- margin: 2em 0;
- border: 0;
- border-top: 1px solid #aaa; }
- blockquote {
- font-size: 0.9em;
- font-style: italic;
- padding-left: 0.5em;
- margin-left: 0;
- border-left: 5px solid #bbc;
- }
- .pre {
- font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
- font-weight: 500;
- font-size: 0.85em;
- background-color: #f0f3ff;
- padding-left: 3px;
- padding-right: 3px;
- border-radius: 4px;
- }
- pre {
- font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
- color: #222;
- font-weight: 500;
- display: inline-block;
- box-sizing: border-box;
- min-width: 100%;
- padding: 0.5em;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- font-size: 0.85em;
- white-space: pre !important;
- overflow-y: hidden;
- overflow-x: visible;
- background-color: ghostwhite;
- border: 1px solid #dde;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px; }
- .pre-scrollable {
- max-height: 340px;
- overflow-y: scroll; }
- /* Nim line-numbered tables */
- .line-nums-table {
- width: 100%;
- table-layout: fixed; }
- table.line-nums-table {
- border-radius: 4px;
- border: 1px solid #cccccc;
- background-color: ghostwhite;
- border-collapse: separate;
- margin-top: 15px;
- margin-bottom: 25px; }
- .line-nums-table tbody {
- border: none; }
- .line-nums-table td pre {
- border: none;
- background-color: transparent; }
- .line-nums-table td.blob-line-nums {
- width: 28px; }
- .line-nums-table td.blob-line-nums pre {
- color: #b0b0b0;
- -webkit-filter: opacity(75%);
- text-align: right;
- border-color: transparent;
- background-color: transparent;
- padding-left: 0px;
- margin-left: 0px;
- padding-right: 0px;
- margin-right: 0px; }
- table {
- max-width: 100%;
- background-color: transparent;
- margin-top: 0.5em;
- margin-bottom: 1.5em;
- border-collapse: collapse;
- border-color: #ccc;
- border-spacing: 0;
- font-size: 0.9em;
- }
- table th, table td {
- padding: 0px 0.5em 0px;
- }
- table th {
- background-color: #e8e8e8;
- font-weight: bold; }
- table th.docinfo-name {
- background-color: transparent;
- }
- table tr:hover {
- background-color: ghostwhite; }
- /* rst2html default used to remove borders from tables and images */
- .borderless, table.borderless td, table.borderless th {
- border: 0; }
- table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 !important; }
- .first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 !important; }
- .last, .with-subtitle {
- margin-bottom: 0 !important; }
- .hidden {
- display: none; }
- blockquote.epigraph {
- margin: 2em 5em; }
- dl.docutils dd {
- margin-bottom: 0.5em; }
- object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
- overflow: hidden; }
- div.figure {
- margin-left: 2em;
- margin-right: 2em; }
- div.footer, div.header {
- clear: both;
- text-align: center;
- color: #666;
- font-size: smaller; }
- div.footer {
- padding-top: 5em;
- }
- div.line-block {
- display: block;
- margin-top: 1em;
- margin-bottom: 1em; }
- div.line-block div.line-block {
- margin-top: 0;
- margin-bottom: 0;
- margin-left: 1.5em; }
- div.topic {
- margin: 2em; }
- div.search_results {
- background-color: antiquewhite;
- margin: 3em;
- padding: 1em;
- border: 1px solid #4d4d4d;
- }
- div#global-links ul {
- margin-left: 0;
- list-style-type: none;
- }
- div#global-links > simple-boot {
- margin-left: 3em;
- }
- hr.docutils {
- width: 75%; }
- img.align-left, .figure.align-left, object.align-left {
- clear: left;
- float: left;
- margin-right: 1em; }
- img.align-right, .figure.align-right, object.align-right {
- clear: right;
- float: right;
- margin-left: 1em; }
- img.align-center, .figure.align-center, object.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto; }
- .align-left {
- text-align: left; }
- .align-center {
- clear: both;
- text-align: center; }
- .align-right {
- text-align: right; }
- /* reset inner alignment in figures */
- div.align-right {
- text-align: inherit; }
- p.attribution {
- text-align: right;
- margin-left: 50%; }
- p.caption {
- font-style: italic; }
- p.credits {
- font-style: italic;
- font-size: smaller; }
- p.label {
- white-space: nowrap; }
- p.rubric {
- font-weight: bold;
- font-size: larger;
- color: maroon;
- text-align: center; }
- p.topic-title {
- font-weight: bold; }
- pre.address {
- margin-bottom: 0;
- margin-top: 0;
- font: inherit; }
- pre.literal-block, pre.doctest-block, pre.math, pre.code {
- margin-left: 2em;
- margin-right: 2em; }
- pre.code .ln {
- color: grey; }
- /* line numbers */
- pre.code, code {
- background-color: #eeeeee; }
- pre.code .comment, code .comment {
- color: #5c6576; }
- pre.code .keyword, code .keyword {
- color: #3B0D06;
- font-weight: bold; }
- pre.code .literal.string, code .literal.string {
- color: #0c5404; }
- pre.code .name.builtin, code .name.builtin {
- color: #352b84; }
- pre.code .deleted, code .deleted {
- background-color: #DEB0A1; }
- pre.code .inserted, code .inserted {
- background-color: #A3D289; }
- span.classifier {
- font-style: oblique; }
- span.classifier-delimiter {
- font-weight: bold; }
- span.option {
- white-space: nowrap; }
- span.problematic {
- color: #b30000; }
- span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80%; }
- span.DecNumber {
- color: #252dbe; }
- span.BinNumber {
- color: #252dbe; }
- span.HexNumber {
- color: #252dbe; }
- span.OctNumber {
- color: #252dbe; }
- span.FloatNumber {
- color: #252dbe; }
- span.Identifier {
- color: #222; }
- span.Keyword {
- font-weight: 600;
- color: #5e8f60; }
- span.StringLit {
- color: #a4255b; }
- span.LongStringLit {
- color: #a4255b; }
- span.CharLit {
- color: #a4255b; }
- span.EscapeSequence {
- color: black; }
- span.Operator {
- color: black; }
- span.Punctuation {
- color: black; }
- span.Comment, span.LongComment {
- font-style: italic;
- font-weight: 400;
- color: #484a86; }
- span.RegularExpression {
- color: darkviolet; }
- span.TagStart {
- color: darkviolet; }
- span.TagEnd {
- color: darkviolet; }
- span.Key {
- color: #252dbe; }
- span.Value {
- color: #252dbe; }
- span.RawData {
- color: #a4255b; }
- span.Assembler {
- color: #252dbe; }
- span.Preprocessor {
- color: #252dbe; }
- span.Directive {
- color: #252dbe; }
- span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference,
- span.Other {
- color: black; }
- /* Pop type, const, proc, and iterator defs in nim def blocks */
- dt pre > span.Identifier, dt pre > span.Operator {
- color: #155da4;
- font-weight: 700; }
- dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
- dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier {
- color: inherit;
- font-weight: inherit; }
- /* Nim sprite for the footer (taken from main page favicon) */
- .nim-sprite {
- display: inline-block;
- height: 16px;
- width: 16px;
- background-position: 0 0;
- background-size: 16px 16px;
- -webkit-filter: opacity(50%);
- background-repeat: no-repeat;
- background-image: url("data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA==");
- margin-bottom: -5px; }
- span.pragmadots {
- /* Position: relative frees us up to make the dots
- look really nice without fucking up the layout and
- causing bulging in the parent container */
- position: relative;
- /* 1px down looks slightly nicer */
- top: 1px;
- padding: 2px;
- background-color: #e8e8e8;
- border-radius: 4px;
- margin: 0 2px;
- cursor: pointer;
- font-size: 0.8em;
- }
- span.pragmadots:hover {
- background-color: #DBDBDB;
- }
- span.pragmawrap {
- display: none;
- }
- span.attachedType {
- display: none;
- visibility: hidden;
- }
- </style>
- <script type="text/javascript" src="dochack.js"></script>
- <script type="text/javascript">
- function main() {
- var pragmaDots = document.getElementsByClassName("pragmadots");
- for (var i = 0; i < pragmaDots.length; i++) {
- pragmaDots[i].onclick = function(event) {
- // Hide tease
- event.target.parentNode.style.display = "none";
- // Show actual
- event.target.parentNode.nextElementSibling.style.display = "inline";
- }
- }
- }
- </script>
- </head>
- <body onload="main()">
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">akane</h1>
- <div class="row">
- <div class="three columns">
- <div id="global-links">
- <ul class="simple">
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="text" id="searchInput"
- onkeyup="search()" />
- </div>
- <div>
- Group by:
- <select onchange="groupBy(this.value)">
- <option value="section">Section</option>
- <option value="type">Type</option>
- </select>
- </div>
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#7" id="57">Types</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#ServerRef"
- title="ServerRef = ref object
- port*: uint16
- address*: string
- server*: AsyncHttpServer"><wbr />Server<wbr />Ref<span class="attachedType"></span></a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#8" id="58">Vars</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#AKANE_DEBUG_MODE"
- title="AKANE_DEBUG_MODE: bool = false"><wbr />AKANE_<wbr />DEBUG_<wbr />MODE<span class="attachedType"></span></a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#12" id="62">Procs</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#newServer%2Cstring%2Cuint16%2Cbool"
- title="newServer(address: string = "127.0.0.1"; port: uint16 = 5000; debug: bool = false): ServerRef"><wbr />new<wbr />Server<span class="attachedType">ServerRef</span></a></li>
- <li><a class="reference" href="#loadtemplate%2Cstring%2CJsonNode"
- title="loadtemplate(name: string; json: JsonNode = %*{}): Future[string]"><wbr />loadtemplate<span class="attachedType"></span></a></li>
- <li><a class="reference" href="#parseQuery%2CRequest"
- title="parseQuery(request: Request): Future[JsonNode]"><wbr />parse<wbr />Query<span class="attachedType"></span></a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#17" id="67">Macros</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#pages.m%2CServerRef%2Cuntyped"
- title="pages(server: ServerRef; body: untyped): untyped"><wbr />pages<span class="attachedType">ServerRef</span></a></li>
- <li><a class="reference" href="#answer.m%2Cuntyped%2Cuntyped"
- title="answer(request, message: untyped; http_code = Http200): untyped"><wbr />answer<span class="attachedType"></span></a></li>
- <li><a class="reference" href="#error.m%2Cuntyped%2Cuntyped"
- title="error(request, message: untyped; http_code = Http404): untyped"><wbr />error<span class="attachedType"></span></a></li>
- <li><a class="reference" href="#start.m%2CServerRef"
- title="start(server: ServerRef): untyped"><wbr />start<span class="attachedType">ServerRef</span></a></li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <div id="tocRoot"></div>
-
- <p class="module-desc"></p>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <a id="ServerRef"></a>
- <dt><pre><a href="akane.html#ServerRef"><span class="Identifier">ServerRef</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
- <span class="Identifier">port</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">uint16</span>
- <span class="Identifier">address</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
- <span class="Identifier">server</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">AsyncHttpServer</span>
- </pre></dt>
- <dd>
- </dd>
- </dl></div>
- <div class="section" id="8">
- <h1><a class="toc-backref" href="#8">Vars</a></h1>
- <dl class="item">
- <a id="AKANE_DEBUG_MODE"></a>
- <dt><pre><a href="akane.html#AKANE_DEBUG_MODE"><span class="Identifier">AKANE_DEBUG_MODE</span></a><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other">=</span> <span class="Identifier">false</span></pre></dt>
- <dd>
- change it with <a class="reference external" href="#newServer,string,uint16,bool">newServer proc</a>
- </dd>
- </dl></div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <a id="newServer,string,uint16,bool"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#newServer%2Cstring%2Cuint16%2Cbool"><span class="Identifier">newServer</span></a><span class="Other">(</span><span class="Identifier">address</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">"127.0.0.1"</span><span class="Other">;</span> <span class="Identifier">port</span><span class="Other">:</span> <span class="Identifier">uint16</span> <span class="Other">=</span> <span class="DecNumber">5000</span><span class="Other">;</span> <span class="Identifier">debug</span><span class="Other">:</span> <span class="Identifier">bool</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <a href="akane.html#ServerRef"><span class="Identifier">ServerRef</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
- <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">WriteDirEffect</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Creates a new ServerRef object.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">address</span></tt> - server address, e.g. "127.0.0.1"</li>
- <li><tt class="docutils literal"><span class="pre">port</span></tt> - server port, e.g. 5000</li>
- <li><tt class="docutils literal"><span class="pre">debug</span></tt> - debug mode</li>
- </ul>
- </dd>
- <a id="loadtemplate,string,JsonNode"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#loadtemplate%2Cstring%2CJsonNode"><span class="Identifier">loadtemplate</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span> <span class="Identifier">json</span><span class="Other">:</span> <span class="Identifier">JsonNode</span> <span class="Other">=</span> <span class="Operator">%*</span><span class="Other">{</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Future</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">inline</span><span class="Other">,</span>
- <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">FutureError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- <p>Loads HTML template from <tt class="docutils literal"><span class="pre">templates</span></tt> folder.</p>
- <p>Arguments:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">name</span></tt> - template's name, e.g. "index", "api", etc.</li>
- <li><tt class="docutils literal"><span class="pre">json</span></tt> - Json data, which replaces in the template.</li>
- </ul>
- <p>Replaces:</p>
- <ul class="simple"><li>$(key) -> value</li>
- <li>if $(key) { ... } -> ... (if value is true)</li>
- </ul>
- </dd>
- <a id="parseQuery,Request"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#parseQuery%2CRequest"><span class="Identifier">parseQuery</span></a><span class="Other">(</span><span class="Identifier">request</span><span class="Other">:</span> <span class="Identifier">Request</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Future</span><span class="Other">[</span><span class="Identifier">JsonNode</span><span class="Other">]</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma">
- <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">FutureError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">TimeEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
- <dd>
- Decodes query.<dl class="docutils"><dt>e.g.:</dt>
- <dd>"a=5&b=10" -> {"a": "5", "b": "10"}</dd>
- </dl>
- <p>This also have debug output, if AKANE_DEBUG_MODE is true.</p>
- </dd>
- </dl></div>
- <div class="section" id="17">
- <h1><a class="toc-backref" href="#17">Macros</a></h1>
- <dl class="item">
- <a id="pages.m,ServerRef,untyped"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#pages.m%2CServerRef%2Cuntyped"><span class="Identifier">pages</span></a><span class="Other">(</span><span class="Identifier">server</span><span class="Other">:</span> <a href="akane.html#ServerRef"><span class="Identifier">ServerRef</span></a><span class="Other">;</span> <span class="Identifier">body</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
- <dd>
- <p>This macro provides convenient page adding.</p>
- <p><tt class="docutils literal"><span class="pre">body</span></tt> should be StmtList. page type can be:</p>
- <ul class="simple"><li><tt class="docutils literal"><span class="pre">equals</span></tt></li>
- <li><tt class="docutils literal"><span class="pre">startswith</span></tt></li>
- <li><tt class="docutils literal"><span class="pre">endswith</span></tt></li>
- <li><tt class="docutils literal"><span class="pre">regex</span></tt></li>
- <li><tt class="docutils literal"><span class="pre">notfound</span></tt> - this page uses without URL argument.</li>
- </ul>
- <blockquote><p><dl class="docutils"><dt>server.pages:</dt>
- <dd><dl class="docutils"><dt>equals("/home"):</dt>
- <dd>echo url echo urlParams</dd>
- </dl>
- </dd>
- </dl>
- </p></blockquote>
- </dd>
- <a id="answer.m,untyped,untyped"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#answer.m%2Cuntyped%2Cuntyped"><span class="Identifier">answer</span></a><span class="Other">(</span><span class="Identifier">request</span><span class="Other">,</span> <span class="Identifier">message</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">http_code</span> <span class="Other">=</span> <span class="Identifier">Http200</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
- <dd>
- Responds from server with utf-8.<dl class="docutils"><dt>Translates to:</dt>
- <dd>await request.respond(Http200, "<head><meta charset='utf-8'></head>" & message)</dd>
- </dl>
- </dd>
- <a id="error.m,untyped,untyped"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#error.m%2Cuntyped%2Cuntyped"><span class="Identifier">error</span></a><span class="Other">(</span><span class="Identifier">request</span><span class="Other">,</span> <span class="Identifier">message</span><span class="Other">:</span> <span class="Identifier">untyped</span><span class="Other">;</span> <span class="Identifier">http_code</span> <span class="Other">=</span> <span class="Identifier">Http404</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
- <dd>
- Responds from server with utf-8.<dl class="docutils"><dt>Translates to:</dt>
- <dd>await request.respond(Http404, "<head><meta charset='utf-8'></head>" & message)</dd>
- </dl>
- </dd>
- <a id="start.m,ServerRef"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#start.m%2CServerRef"><span class="Identifier">start</span></a><span class="Other">(</span><span class="Identifier">server</span><span class="Other">:</span> <a href="akane.html#ServerRef"><span class="Identifier">ServerRef</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
- <dd>
- Starts server.
- </dd>
- </dl></div>
- </div>
- </div>
- <div class="row">
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br/>
- <small>Made with Nim. Generated: 2020-03-15 03:39:34 UTC</small>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|