2019-10-04 22:39:35 +01:00
|
|
|
<!doctype html>
|
2019-12-05 21:38:59 +00:00
|
|
|
<html lang="en">
|
2019-10-04 22:39:35 +01:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2020-01-19 19:39:45 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2019-10-04 22:39:35 +01:00
|
|
|
<title>Documentation - Zig</title>
|
2019-10-09 20:22:26 +01:00
|
|
|
<link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAgklEQVR4AWMYWuD7EllJIM4G4g4g5oIJ/odhOJ8wToOxSTXgNxDHoeiBMfA4+wGShjyYOCkG/IGqWQziEzYAoUAeiF9D5U+DxEg14DRU7jWIT5IBIOdCxf+A+CQZAAoopEB7QJwBCBwHiip8UYmRdrAlDpIMgApwQZNnNii5Dq0MBgCxxycBnwEd+wAAAABJRU5ErkJggg==">
|
2019-12-05 21:38:59 +00:00
|
|
|
<style>
|
2019-10-10 22:39:08 +01:00
|
|
|
:root {
|
|
|
|
font-size: 1em;
|
|
|
|
--ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
|
|
--mono: "Source Code Pro", monospace;
|
|
|
|
--tx-color: #141414;
|
|
|
|
--bg-color: #ffffff;
|
|
|
|
--link-color: #2A6286;
|
|
|
|
--sidebar-sh-color: rgba(0, 0, 0, 0.09);
|
2019-10-16 23:54:39 +01:00
|
|
|
--sidebar-pkg-bg-color: #f1f1f1;
|
|
|
|
--sidebar-pkglnk-tx-color: #141414;
|
|
|
|
--sidebar-pkglnk-tx-color-hover: #fff;
|
|
|
|
--sidebar-pkglnk-tx-color-active: #000;
|
|
|
|
--sidebar-pkglnk-bg-color: transparent;
|
|
|
|
--sidebar-pkglnk-bg-color-hover: #555;
|
|
|
|
--sidebar-pkglnk-bg-color-active: #FFBB4D;
|
2019-10-10 22:39:08 +01:00
|
|
|
--search-bg-color: #f3f3f3;
|
|
|
|
--search-bg-color-focus: #ffffff;
|
|
|
|
--search-sh-color: rgba(0, 0, 0, 0.18);
|
|
|
|
--help-sh-color: rgba(0, 0, 0, 0.75);
|
2022-08-06 15:07:32 +01:00
|
|
|
--help-bg-color: #aaa;
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2022-08-06 15:00:53 +01:00
|
|
|
html, body { margin: 0; padding: 0; height: 100%; }
|
2019-10-10 22:39:08 +01:00
|
|
|
|
|
|
|
a {
|
|
|
|
text-decoration: none;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
a:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.hidden {
|
2019-10-07 19:47:59 +01:00
|
|
|
display: none;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
|
|
|
|
/* layout */
|
|
|
|
.canvas {
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
overflow: hidden;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
font-family: var(--ui);
|
|
|
|
color: var(--tx-color);
|
|
|
|
background-color: var(--bg-color);
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
|
|
|
|
.flex-main {
|
|
|
|
display: flex;
|
2022-01-29 19:13:10 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
justify-content: center;
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
z-index: 100;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
|
|
|
|
.flex-filler {
|
|
|
|
flex-grow: 1;
|
|
|
|
flex-shrink: 1;
|
2019-10-09 04:15:47 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
|
|
|
|
.flex-left {
|
|
|
|
width: 12rem;
|
|
|
|
max-width: 15vw;
|
|
|
|
min-width: 9.5rem;
|
2019-10-07 19:47:59 +01:00
|
|
|
overflow: auto;
|
2020-01-19 19:39:45 +00:00
|
|
|
-webkit-overflow-scrolling: touch;
|
2019-10-10 22:39:08 +01:00
|
|
|
overflow-wrap: break-word;
|
|
|
|
flex-shrink: 0;
|
|
|
|
flex-grow: 0;
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
z-index: 300;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
|
|
|
|
.flex-right {
|
|
|
|
display: flex;
|
|
|
|
overflow: auto;
|
2020-01-19 19:39:45 +00:00
|
|
|
-webkit-overflow-scrolling: touch;
|
2019-10-10 22:39:08 +01:00
|
|
|
flex-grow: 1;
|
|
|
|
flex-shrink: 1;
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
z-index: 200;
|
|
|
|
}
|
|
|
|
|
|
|
|
.flex-right > .wrap {
|
|
|
|
width: 60rem;
|
|
|
|
max-width: 85vw;
|
|
|
|
flex-shrink: 1;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.help-modal {
|
|
|
|
z-index: 400;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
/* sidebar */
|
|
|
|
.sidebar {
|
|
|
|
font-size: 1rem;
|
|
|
|
background-color: var(--bg-color);
|
|
|
|
box-shadow: 0 0 1rem var(--sidebar-sh-color);
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar .logo {
|
2019-10-12 17:17:35 +01:00
|
|
|
padding: 1rem 0.35rem 0.35rem 0.35rem;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-12 17:17:35 +01:00
|
|
|
.sidebar .logo > svg {
|
|
|
|
display: block;
|
|
|
|
overflow: visible;
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar h2 {
|
|
|
|
margin: 0.5rem;
|
|
|
|
padding: 0;
|
|
|
|
font-size: 1.2rem;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar h2 > span {
|
|
|
|
border-bottom: 0.125rem dotted var(--tx-color);
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar .packages {
|
|
|
|
list-style-type: none;
|
2019-10-07 19:47:59 +01:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2019-10-16 23:54:39 +01:00
|
|
|
background-color: var(--sidebar-pkg-bg-color);
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar .packages > li > a {
|
|
|
|
display: block;
|
|
|
|
padding: 0.5rem 1rem;
|
2019-10-16 23:54:39 +01:00
|
|
|
color: var(--sidebar-pkglnk-tx-color);
|
|
|
|
background-color: var(--sidebar-pkglnk-bg-color);
|
2019-10-10 22:39:08 +01:00
|
|
|
text-decoration: none;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar .packages > li > a:hover {
|
2019-10-16 23:54:39 +01:00
|
|
|
color: var(--sidebar-pkglnk-tx-color-hover);
|
|
|
|
background-color: var(--sidebar-pkglnk-bg-color-hover);
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar .packages > li > a.active {
|
2019-10-16 23:54:39 +01:00
|
|
|
color: var(--sidebar-pkglnk-tx-color-active);
|
|
|
|
background-color: var(--sidebar-pkglnk-bg-color-active);
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.sidebar p.str {
|
|
|
|
margin: 0.5rem;
|
|
|
|
font-family: var(--mono);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* docs section */
|
|
|
|
.docs {
|
2019-10-12 17:17:35 +01:00
|
|
|
padding: 1rem 0.7rem 2.4rem 1.4rem;
|
2019-10-10 22:39:08 +01:00
|
|
|
font-size: 1rem;
|
|
|
|
background-color: var(--bg-color);
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
}
|
|
|
|
|
|
|
|
.docs .search {
|
|
|
|
width: 100%;
|
2019-10-12 17:17:35 +01:00
|
|
|
margin-bottom: 0.8rem;
|
2019-10-10 22:39:08 +01:00
|
|
|
padding: 0.5rem;
|
|
|
|
font-family: var(--ui);
|
2022-08-14 10:34:41 +01:00
|
|
|
font-size: 1rem;
|
2019-10-10 22:39:08 +01:00
|
|
|
color: var(--tx-color);
|
|
|
|
background-color: var(--search-bg-color);
|
|
|
|
border-top: 0;
|
|
|
|
border-left: 0;
|
|
|
|
border-right: 0;
|
|
|
|
border-bottom-width: 0.125rem;
|
|
|
|
border-bottom-style: solid;
|
|
|
|
border-bottom-color: var(--tx-color);
|
|
|
|
outline: none;
|
|
|
|
transition: border-bottom-color 0.35s, background 0.35s, box-shadow 0.35s;
|
2020-01-19 19:39:45 +00:00
|
|
|
border-radius: 0;
|
|
|
|
-webkit-appearance: none;
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs .search:focus {
|
|
|
|
background-color: var(--search-bg-color-focus);
|
|
|
|
border-bottom-color: #ffbb4d;
|
|
|
|
box-shadow: 0 0.3em 1em 0.125em var(--search-sh-color);
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2022-08-06 14:09:26 +01:00
|
|
|
#searchPlaceholder {
|
|
|
|
position: absolute;
|
|
|
|
pointer-events: none;
|
|
|
|
top: 5px;
|
|
|
|
left: 5px;
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs a {
|
|
|
|
color: var(--link-color);
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-12 17:17:35 +01:00
|
|
|
.docs p {
|
|
|
|
margin: 0.8rem 0;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs pre {
|
|
|
|
font-family: var(--mono);
|
2022-08-06 15:00:53 +01:00
|
|
|
font-size: 1em;
|
|
|
|
background-color: #F5F5F5;
|
|
|
|
padding: 1em;
|
2019-10-10 22:39:08 +01:00
|
|
|
overflow-x: auto;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs code {
|
|
|
|
font-family: var(--mono);
|
2019-10-12 17:17:35 +01:00
|
|
|
font-size: 1em;
|
2019-10-10 22:39:08 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs h1 {
|
2019-10-12 17:17:35 +01:00
|
|
|
font-size: 1.4em;
|
|
|
|
margin: 0.8em 0;
|
|
|
|
padding: 0;
|
|
|
|
border-bottom: 0.0625rem dashed;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2022-08-06 15:00:53 +01:00
|
|
|
.docs h2 {
|
2019-10-07 19:47:59 +01:00
|
|
|
font-size: 1.3em;
|
|
|
|
margin: 0.5em 0;
|
|
|
|
padding: 0;
|
2019-10-12 17:17:35 +01:00
|
|
|
border-bottom: 0.0625rem solid;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav {
|
2019-10-07 19:47:59 +01:00
|
|
|
list-style-type: none;
|
2019-10-12 17:17:35 +01:00
|
|
|
margin: 0;
|
2019-10-07 19:47:59 +01:00
|
|
|
padding: 0;
|
|
|
|
overflow: hidden;
|
2019-10-09 00:04:35 +01:00
|
|
|
background-color: #f1f1f1;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li {
|
2019-10-07 19:47:59 +01:00
|
|
|
float:left;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li a {
|
2019-10-07 19:47:59 +01:00
|
|
|
display: block;
|
2019-10-09 00:04:35 +01:00
|
|
|
color: #000;
|
2019-10-07 19:47:59 +01:00
|
|
|
text-align: center;
|
|
|
|
padding: .5em .8em;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li a:hover {
|
2019-10-09 00:04:35 +01:00
|
|
|
background-color: #555;
|
|
|
|
color: #fff;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li a.active {
|
2019-10-09 00:04:35 +01:00
|
|
|
background-color: #FFBB4D;
|
|
|
|
color: #000;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
#listSearchResults li.selected {
|
|
|
|
background-color: #93e196;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
#tableFnErrors dt {
|
|
|
|
font-weight: bold;
|
2019-10-07 19:47:59 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2020-01-19 19:39:45 +00:00
|
|
|
.examples {
|
2019-10-16 23:35:10 +01:00
|
|
|
list-style-type: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
2020-01-19 19:39:45 +00:00
|
|
|
.examples li {
|
2019-10-16 23:35:10 +01:00
|
|
|
padding: 0.5em 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow-x: auto;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs td {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0.5em;
|
2019-10-10 22:48:54 +01:00
|
|
|
max-width: 27em;
|
2019-10-10 22:39:08 +01:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow-x: hidden;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2022-07-31 01:19:37 +01:00
|
|
|
.fieldHasDocs {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.fieldDocs {
|
2022-08-20 03:06:01 +01:00
|
|
|
border: 1px solid #F5F5F5;
|
2022-07-31 01:19:37 +01:00
|
|
|
border-top: 0px;
|
|
|
|
padding: 1px 1em;
|
|
|
|
}
|
|
|
|
|
2022-08-06 14:17:59 +01:00
|
|
|
/* help modal */
|
2019-10-10 22:39:08 +01:00
|
|
|
.help-modal {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2019-10-07 20:41:45 +01:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2019-10-10 22:39:08 +01:00
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
background-color: rgba(0, 0, 0, 0.15);
|
|
|
|
backdrop-filter: blur(0.3em);
|
|
|
|
}
|
|
|
|
|
2022-08-06 14:05:58 +01:00
|
|
|
.help-modal > .modal {
|
2019-10-10 22:39:08 +01:00
|
|
|
max-width: 97vw;
|
|
|
|
max-height: 97vh;
|
|
|
|
overflow: auto;
|
|
|
|
font-size: 1rem;
|
2019-10-07 20:41:45 +01:00
|
|
|
color: #fff;
|
2022-08-06 15:07:32 +01:00
|
|
|
background-color: var(--help-bg-color);
|
2019-10-10 22:39:08 +01:00
|
|
|
border: 0.125rem solid #000;
|
|
|
|
box-shadow: 0 0.5rem 2.5rem 0.3rem var(--help-sh-color);
|
2019-10-07 20:41:45 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.help-modal h1 {
|
|
|
|
margin: 0.75em 2.5em 1em 2.5em;
|
2019-10-07 20:41:45 +01:00
|
|
|
font-size: 1.5em;
|
2019-10-10 22:39:08 +01:00
|
|
|
text-align: center;
|
2019-10-07 20:41:45 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.help-modal dt, .help-modal dd {
|
2019-10-07 20:41:45 +01:00
|
|
|
display: inline;
|
|
|
|
margin: 0 0.2em;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.help-modal dl {
|
|
|
|
margin-left: 0.5em;
|
|
|
|
margin-right: 0.5em;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2022-08-06 14:09:26 +01:00
|
|
|
kbd {
|
2019-10-10 22:39:08 +01:00
|
|
|
display: inline-block;
|
|
|
|
padding: 0.3em 0.2em;
|
2022-08-14 10:34:41 +01:00
|
|
|
font-family: var(--mono);
|
|
|
|
font-size: 1em;
|
2019-10-10 22:39:08 +01:00
|
|
|
line-height: 0.8em;
|
|
|
|
vertical-align: middle;
|
2019-10-07 20:41:45 +01:00
|
|
|
color: #000;
|
|
|
|
background-color: #fafbfc;
|
|
|
|
border-color: #d1d5da;
|
|
|
|
border-bottom-color: #c6cbd1;
|
2019-10-10 22:39:08 +01:00
|
|
|
border: solid 0.0625em;
|
|
|
|
border-radius: 0.1875em;
|
2022-08-06 14:34:38 +01:00
|
|
|
box-shadow: inset 0 -0.2em 0 #c6cbd1;
|
2019-10-07 20:41:45 +01:00
|
|
|
cursor: default;
|
|
|
|
}
|
2022-08-18 18:32:02 +01:00
|
|
|
|
|
|
|
#listFns > div {
|
|
|
|
padding-bottom: 10px;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2022-08-06 14:17:59 +01:00
|
|
|
#listFns dt {
|
|
|
|
font-family: var(--mono);
|
|
|
|
}
|
|
|
|
.argBreaker {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-06-02 17:51:43 +01:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
/* tokens */
|
|
|
|
.tok-kw {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #333;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-str {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #d14;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-builtin {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #0086b3;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-comment {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #777;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-fn {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #900;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-null {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #008080;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-number {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #008080;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-type {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #458;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
/* dark mode */
|
2019-10-07 19:47:59 +01:00
|
|
|
@media (prefers-color-scheme: dark) {
|
2019-10-10 22:39:08 +01:00
|
|
|
:root {
|
|
|
|
--tx-color: #bbb;
|
|
|
|
--bg-color: #111;
|
|
|
|
--link-color: #88f;
|
|
|
|
--sidebar-sh-color: rgba(128, 128, 128, 0.09);
|
2019-10-16 23:54:39 +01:00
|
|
|
--sidebar-pkg-bg-color: #333;
|
|
|
|
--sidebar-pkglnk-tx-color: #fff;
|
|
|
|
--sidebar-pkglnk-tx-color-hover: #fff;
|
|
|
|
--sidebar-pkglnk-tx-color-active: #000;
|
|
|
|
--sidebar-pkglnk-bg-color: transparent;
|
|
|
|
--sidebar-pkglnk-bg-color-hover: #555;
|
|
|
|
--sidebar-pkglnk-bg-color-active: #FFBB4D;
|
2019-10-10 22:39:08 +01:00
|
|
|
--search-bg-color: #3c3c3c;
|
|
|
|
--search-bg-color-focus: #000;
|
|
|
|
--search-sh-color: rgba(255, 255, 255, 0.28);
|
|
|
|
--help-sh-color: rgba(142, 142, 142, 0.5);
|
2022-08-06 15:07:32 +01:00
|
|
|
--help-bg-color: #333;
|
2019-10-05 20:33:23 +01:00
|
|
|
}
|
2022-03-24 17:52:07 +00:00
|
|
|
|
2019-10-10 22:39:08 +01:00
|
|
|
.docs pre {
|
2019-10-07 19:47:59 +01:00
|
|
|
background-color:#2A2A2A;
|
2019-10-05 20:33:23 +01:00
|
|
|
}
|
2022-08-20 03:06:01 +01:00
|
|
|
.fieldDocs {
|
|
|
|
border-color:#2A2A2A;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav {
|
2019-10-09 00:04:35 +01:00
|
|
|
background-color: #333;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li a {
|
2019-10-09 00:04:35 +01:00
|
|
|
color: #fff;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li a:hover {
|
2019-10-09 00:04:35 +01:00
|
|
|
background-color: #555;
|
|
|
|
color: #fff;
|
2019-10-07 22:46:22 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listNav li a.active {
|
2019-10-09 00:04:35 +01:00
|
|
|
background-color: #FFBB4D;
|
|
|
|
color: #000;
|
2019-10-07 22:46:22 +01:00
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listSearchResults li.selected {
|
2019-10-07 22:46:22 +01:00
|
|
|
background-color: #000;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
#listSearchResults li.selected a {
|
2019-10-07 22:46:22 +01:00
|
|
|
color: #fff;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-kw {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #eee;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-str {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #2e5;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-builtin {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #ff894c;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-comment {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #aa7;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-fn {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #e33;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-null {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #ff8080;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-number {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #ff8080;
|
|
|
|
}
|
2019-10-10 22:39:08 +01:00
|
|
|
.tok-type {
|
2019-10-08 16:52:06 +01:00
|
|
|
color: #68f;
|
|
|
|
}
|
2019-10-10 16:03:57 +01:00
|
|
|
}
|
2020-01-19 19:39:45 +00:00
|
|
|
|
|
|
|
@media only screen and (max-width: 750px) {
|
|
|
|
.canvas {
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
.flex-main {
|
|
|
|
flex-direction: column;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.sidebar {
|
|
|
|
min-width: calc(100vw - 2.8rem);
|
|
|
|
padding-left: 1.4rem;
|
|
|
|
padding-right: 1.4rem;
|
|
|
|
}
|
|
|
|
.logo {
|
|
|
|
max-width: 6.5rem;
|
|
|
|
}
|
|
|
|
.flex-main > .flex-filler {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.flex-main > .flex-right > .flex-filler {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.flex-main > .flex-right > .wrap {
|
|
|
|
max-width: 100vw;
|
|
|
|
}
|
|
|
|
.flex-main > .flex-right > .wrap > .docs {
|
|
|
|
padding-right: 1.4rem;
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
.packages {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
.table-container table {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
.table-container tr {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
.examples {
|
|
|
|
overflow-x: scroll;
|
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
max-width: 100vw;
|
|
|
|
margin-left: -1.4rem;
|
|
|
|
margin-right: -1.4rem;
|
|
|
|
}
|
|
|
|
.examples li {
|
|
|
|
width: max-content;
|
|
|
|
padding-left: 1.4rem;
|
|
|
|
padding-right: 1.4rem;
|
|
|
|
}
|
|
|
|
.mobile-scroll-container {
|
|
|
|
overflow-x: scroll;
|
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
margin-left: -1.4rem;
|
|
|
|
margin-right: -1.4rem;
|
|
|
|
max-width: 100vw;
|
|
|
|
}
|
|
|
|
.mobile-scroll-container > .scroll-item {
|
|
|
|
margin-left: 1.4rem;
|
|
|
|
margin-right: 1.4rem;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: max-content;
|
|
|
|
display: inline-block;
|
|
|
|
min-width: calc(100% - 2.8rem);
|
|
|
|
}
|
|
|
|
}
|
2022-07-19 21:42:57 +01:00
|
|
|
.banner {
|
|
|
|
background-color: orange;
|
|
|
|
text-align: center;
|
|
|
|
color: black;
|
2022-07-19 21:54:32 +01:00
|
|
|
padding: 5px 5px;
|
|
|
|
}
|
|
|
|
.banner a {
|
|
|
|
color: black;
|
|
|
|
text-decoration: underline;
|
2022-07-19 21:42:57 +01:00
|
|
|
}
|
2019-10-04 22:39:35 +01:00
|
|
|
</style>
|
|
|
|
</head>
|
2019-10-10 22:39:08 +01:00
|
|
|
<body class="canvas">
|
2022-07-19 21:42:57 +01:00
|
|
|
<div class="banner">
|
2022-07-19 21:54:32 +01:00
|
|
|
This is a beta autodoc build; expect bugs and missing information.
|
2022-08-06 14:17:59 +01:00
|
|
|
<a href="https://github.com/ziglang/zig/wiki/How-to-contribute-to-Autodoc">Report an Issue</a>,
|
2022-07-19 21:54:32 +01:00
|
|
|
<a href="https://github.com/ziglang/zig/wiki/How-to-contribute-to-Autodoc">Contribute</a>,
|
|
|
|
<a href="https://github.com/ziglang/zig/wiki/How-to-read-the-standard-library-source-code">Learn more about stdlib source code</a>.
|
2022-07-19 21:42:57 +01:00
|
|
|
</div>
|
2019-10-10 22:39:08 +01:00
|
|
|
<div class="flex-main">
|
2019-10-10 16:03:57 +01:00
|
|
|
<div class="flex-filler"></div>
|
2019-10-10 22:39:08 +01:00
|
|
|
<div class="flex-left sidebar">
|
|
|
|
<nav>
|
|
|
|
<div class="logo">
|
2022-06-07 15:40:53 +01:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 140">
|
|
|
|
<g fill="#F7A41D">
|
2022-08-06 14:17:59 +01:00
|
|
|
<g>
|
|
|
|
<polygon points="46,22 28,44 19,30"/>
|
|
|
|
<polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"/>
|
|
|
|
<polygon points="31,95 12,117 4,106"/>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<polygon points="56,22 62,36 37,44"/>
|
|
|
|
<polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"/>
|
|
|
|
<polygon points="116,95 97,117 90,104"/>
|
|
|
|
<polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"/>
|
|
|
|
<polygon points="150,0 52,117 3,140 101,22"/>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<polygon points="141,22 140,40 122,45"/>
|
|
|
|
<polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"/>
|
|
|
|
<polygon points="125,95 130,110 106,117"/>
|
|
|
|
</g>
|
2022-06-07 15:40:53 +01:00
|
|
|
</g>
|
|
|
|
<style>
|
|
|
|
#text { fill: #121212 }
|
|
|
|
@media (prefers-color-scheme: dark) { #text { fill: #f2f2f2 } }
|
|
|
|
</style>
|
|
|
|
<g id="text">
|
2022-08-06 14:17:59 +01:00
|
|
|
<g>
|
|
|
|
<polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"/>
|
|
|
|
<polygon points="260,37 207,99 207,103 176,103 229,40 229,37"/>
|
|
|
|
<polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"/>
|
|
|
|
</g>
|
|
|
|
<rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"/>
|
|
|
|
<g>
|
|
|
|
<polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"/>
|
|
|
|
<polygon points="360,68 376,81 346,67"/>
|
|
|
|
<path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 c14.3,0,29.2,5.5,38.9,14l-13,15c-7.1-6.3-16.8-10-25.9-10c-17,0-30.2,12.9-30.2,29.5c0,16.8,13.3,29.6,30.3,29.6 c5.7,0,12.8-2.3,19-5.5L394,106z"/>
|
|
|
|
</g>
|
2022-06-07 15:40:53 +01:00
|
|
|
</g>
|
2019-10-12 17:17:35 +01:00
|
|
|
</svg>
|
2022-08-06 14:17:59 +01:00
|
|
|
</div>
|
2022-01-29 19:13:10 +00:00
|
|
|
<div id="sectMainPkg" class="hidden">
|
|
|
|
<h2><span>Main Package</span></h2>
|
|
|
|
<ul class="packages">
|
|
|
|
<li><a id="mainPkg" class="" href=""></a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2019-10-10 22:39:08 +01:00
|
|
|
<div id="sectPkgs" class="hidden">
|
2022-01-29 19:13:10 +00:00
|
|
|
<h2><span>Dependencies</span></h2>
|
2019-10-10 22:39:08 +01:00
|
|
|
<ul id="listPkgs" class="packages"></ul>
|
|
|
|
</div>
|
|
|
|
<div id="sectInfo" class="hidden">
|
|
|
|
<h2><span>Zig Version</span></h2>
|
|
|
|
<p class="str" id="tdZigVer"></p>
|
|
|
|
</div>
|
2022-08-06 14:17:59 +01:00
|
|
|
<div>
|
|
|
|
<input id="privDeclsBox" type="checkbox"/>
|
|
|
|
<label for="privDeclsBox">Internal Doc Mode</label>
|
|
|
|
</div>
|
2019-10-10 22:39:08 +01:00
|
|
|
</nav>
|
|
|
|
</div>
|
2022-08-14 18:17:20 +01:00
|
|
|
<div id="docs" class="flex-right">
|
2019-10-10 22:39:08 +01:00
|
|
|
<div class="wrap">
|
|
|
|
<section class="docs">
|
2022-08-06 14:09:26 +01:00
|
|
|
<div style="position: relative">
|
|
|
|
<span id="searchPlaceholder"><kbd>S</kbd> to search, <kbd>?</kbd> for more options</span>
|
2022-08-06 14:16:27 +01:00
|
|
|
<input type="search" class="search" id="search" autocomplete="off" spellcheck="false" disabled>
|
2022-08-06 14:09:26 +01:00
|
|
|
</div>
|
2019-10-10 16:03:57 +01:00
|
|
|
<p id="status">Loading...</p>
|
|
|
|
<div id="sectNav" class="hidden"><ul id="listNav"></ul></div>
|
|
|
|
<div id="fnProto" class="hidden">
|
2020-01-19 19:39:45 +00:00
|
|
|
<div class="mobile-scroll-container"><pre id="fnProtoCode" class="scroll-item"></pre></div>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<h1 id="hdrName" class="hidden"></h1>
|
2019-10-11 01:54:03 +01:00
|
|
|
<div id="fnNoExamples" class="hidden">
|
|
|
|
<p>This function is not tested or referenced.</p>
|
|
|
|
</div>
|
|
|
|
<div id="declNoRef" class="hidden">
|
|
|
|
<p>
|
|
|
|
This declaration is not tested or referenced, and it has therefore not been included in
|
|
|
|
semantic analysis, which means the only documentation available is whatever is in the
|
|
|
|
doc comments.
|
|
|
|
</p>
|
|
|
|
</div>
|
2019-11-15 13:03:28 +00:00
|
|
|
<div id="tldDocs" class="hidden"></div>
|
2019-12-04 18:03:44 +00:00
|
|
|
<div id="sectParams" class="hidden">
|
|
|
|
<h2>Parameters</h2>
|
|
|
|
<div id="listParams"></div>
|
|
|
|
</div>
|
2019-10-10 16:03:57 +01:00
|
|
|
<div id="sectFnErrors" class="hidden">
|
|
|
|
<h2>Errors</h2>
|
|
|
|
<div id="fnErrorsAnyError">
|
|
|
|
<p><span class="tok-type">anyerror</span> means the error set is known only at runtime.</p>
|
|
|
|
</div>
|
|
|
|
<div id="tableFnErrors"><dl id="listFnErrors"></dl></div>
|
|
|
|
</div>
|
|
|
|
<div id="sectSearchResults" class="hidden">
|
|
|
|
<h2>Search Results</h2>
|
|
|
|
<ul id="listSearchResults"></ul>
|
2022-08-06 16:29:13 +01:00
|
|
|
<p id="sectSearchAllResultsLink" class="hidden"><a href="">show all results</a></p>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectSearchNoResults" class="hidden">
|
|
|
|
<h2>No Results Found</h2>
|
2022-08-14 10:28:12 +01:00
|
|
|
<p>Here are some things you can try:</p>
|
|
|
|
<ul>
|
|
|
|
<li>Check out the <a id="langRefLink">Language Reference</a> for the language itself.</li>
|
|
|
|
<li>Check out the <a href="https://ziglang.org/learn/">Learn page</a> for other helpful resources for learning Zig.</li>
|
|
|
|
<li>Use your search engine.</li>
|
|
|
|
</ul>
|
|
|
|
<p>Press <kbd>?</kbd> to see keyboard shortcuts and <kbd>Esc</kbd> to return.</p>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectFields" class="hidden">
|
|
|
|
<h2>Fields</h2>
|
2019-10-16 23:35:10 +01:00
|
|
|
<div id="listFields"></div>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectTypes" class="hidden">
|
|
|
|
<h2>Types</h2>
|
2019-10-16 23:35:10 +01:00
|
|
|
<ul id="listTypes"></ul>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectNamespaces" class="hidden">
|
|
|
|
<h2>Namespaces</h2>
|
2019-10-16 23:35:10 +01:00
|
|
|
<ul id="listNamespaces"></ul>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectGlobalVars" class="hidden">
|
|
|
|
<h2>Global Variables</h2>
|
2020-01-19 19:39:45 +00:00
|
|
|
<div class="table-container">
|
|
|
|
<table>
|
|
|
|
<tbody id="listGlobalVars"></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectFns" class="hidden">
|
|
|
|
<h2>Functions</h2>
|
2020-01-19 19:39:45 +00:00
|
|
|
<div class="table-container">
|
2022-06-02 17:51:43 +01:00
|
|
|
<dl id="listFns"></dl>
|
2020-01-19 19:39:45 +00:00
|
|
|
</div>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectValues" class="hidden">
|
|
|
|
<h2>Values</h2>
|
2020-01-19 19:39:45 +00:00
|
|
|
<div class="table-container">
|
|
|
|
<table>
|
|
|
|
<tbody id="listValues"></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div id="sectErrSets" class="hidden">
|
|
|
|
<h2>Error Sets</h2>
|
2019-10-16 23:35:10 +01:00
|
|
|
<ul id="listErrSets"></ul>
|
|
|
|
</div>
|
|
|
|
<div id="fnExamples" class="hidden">
|
|
|
|
<h2>Examples</h2>
|
2020-01-19 19:39:45 +00:00
|
|
|
<ul id="listFnExamples" class="examples"></ul>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
2022-03-28 17:50:52 +01:00
|
|
|
<div id="sectTests" class="hidden">
|
|
|
|
<h2>Tests</h2>
|
|
|
|
<div class="table-container">
|
|
|
|
<table>
|
|
|
|
<tbody id="listTests"></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-06 14:17:59 +01:00
|
|
|
</section>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
<div class="flex-filler"></div>
|
2019-10-08 23:09:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-06 14:05:58 +01:00
|
|
|
<div id="helpModal" class="hidden">
|
2019-10-10 22:39:08 +01:00
|
|
|
<div class="help-modal">
|
2022-08-06 14:05:58 +01:00
|
|
|
<div class="modal">
|
2019-10-10 16:03:57 +01:00
|
|
|
<h1>Keyboard Shortcuts</h1>
|
2022-08-06 14:05:58 +01:00
|
|
|
<dl><dt><kbd>?</kbd></dt><dd>Show this help modal</dd></dl>
|
2019-10-10 16:03:57 +01:00
|
|
|
<dl><dt><kbd>s</kbd></dt><dd>Focus the search field</dd></dl>
|
2022-08-14 10:35:11 +01:00
|
|
|
<div style="margin-left: 1em">
|
|
|
|
<dl><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd></dl>
|
|
|
|
<dl><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd></dl>
|
|
|
|
<dl><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd></dl>
|
|
|
|
</div>
|
|
|
|
<dl><dt><kbd>Esc</kbd></dt><dd>Clear focus; close this modal</dd></dl>
|
2019-10-10 16:03:57 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-07 20:41:45 +01:00
|
|
|
</div>
|
2019-10-04 22:39:35 +01:00
|
|
|
<script src="data.js"></script>
|
|
|
|
<script src="main.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|