deploy: eb974fe3ac
This commit is contained in:
parent
1f80328539
commit
07238c4cde
7 changed files with 59 additions and 15 deletions
|
@ -8,7 +8,6 @@ Original by Dempfi (https://github.com/dempfi/ayu)
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
background: #191f26;
|
background: #191f26;
|
||||||
color: #e6e1cf;
|
color: #e6e1cf;
|
||||||
padding: 0.5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-comment,
|
.hljs-comment,
|
||||||
|
|
|
@ -208,24 +208,63 @@ pre {
|
||||||
pre > .buttons {
|
pre > .buttons {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
right: 5px;
|
right: 0px;
|
||||||
top: 5px;
|
top: 2px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 2px 0px;
|
||||||
|
|
||||||
color: var(--sidebar-fg);
|
color: var(--sidebar-fg);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
transition: visibility 0.1s linear, opacity 0.1s linear;
|
||||||
|
}
|
||||||
|
pre:hover > .buttons {
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1
|
||||||
}
|
}
|
||||||
pre > .buttons :hover {
|
pre > .buttons :hover {
|
||||||
color: var(--sidebar-active);
|
color: var(--sidebar-active);
|
||||||
|
border-color: var(--icons-hover);
|
||||||
|
background-color: var(--theme-hover);
|
||||||
}
|
}
|
||||||
pre > .buttons i {
|
pre > .buttons i {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
pre > .buttons button {
|
pre > .buttons button {
|
||||||
color: inherit;
|
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
cursor: inherit;
|
cursor: inherit;
|
||||||
|
margin: 0px 5px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border-color: var(--icons);
|
||||||
|
background-color: var(--theme-popup-bg);
|
||||||
|
transition: 100ms;
|
||||||
|
transition-property: color,border-color,background-color;
|
||||||
|
color: var(--icons);
|
||||||
}
|
}
|
||||||
|
@media (pointer: coarse) {
|
||||||
|
pre > .buttons button {
|
||||||
|
/* On mobile, make it easier to tap buttons. */
|
||||||
|
padding: 0.3rem 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: ACE editors overlap their buttons because ACE does absolute
|
||||||
|
positioning within the code block which breaks padding. The only solution I
|
||||||
|
can think of is to move the padding to the outer pre tag (or insert a div
|
||||||
|
wrapper), but that would require fixing a whole bunch of CSS rules.
|
||||||
|
*/
|
||||||
|
.hljs.ace_editor {
|
||||||
|
padding: 0rem 0rem;
|
||||||
|
}
|
||||||
|
|
||||||
pre > .result {
|
pre > .result {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,16 @@ code {
|
||||||
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
|
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make long words/inline code not x overflow */
|
||||||
|
main {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make wide tables scroll if they overflow */
|
||||||
|
.table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/* Don't change font size in headers. */
|
/* Don't change font size in headers. */
|
||||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||||
font-size: unset;
|
font-size: unset;
|
||||||
|
@ -80,8 +90,7 @@ h6:target::before {
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 0 15px;
|
padding: 0 5px 50px 5px;
|
||||||
padding-bottom: 50px;
|
|
||||||
}
|
}
|
||||||
.content main {
|
.content main {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
background: #f6f7f6;
|
background: #f6f7f6;
|
||||||
color: #000;
|
color: #000;
|
||||||
padding: 0.5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-emphasis {
|
.hljs-emphasis {
|
||||||
|
|
|
@ -1342,7 +1342,7 @@ enum StarWarsEpisode {
|
||||||
<span class="boring">fn main() {}
|
<span class="boring">fn main() {}
|
||||||
</span></code></pre></pre>
|
</span></code></pre></pre>
|
||||||
<h2 id="supported-macro-attributes-derive"><a class="header" href="#supported-macro-attributes-derive">Supported Macro Attributes (Derive)</a></h2>
|
<h2 id="supported-macro-attributes-derive"><a class="header" href="#supported-macro-attributes-derive">Supported Macro Attributes (Derive)</a></h2>
|
||||||
<table><thead><tr><th>Name of Attribute</th><th style="text-align: center">Container Support</th><th style="text-align: center">Field Support</th></tr></thead><tbody>
|
<div class="table-wrapper"><table><thead><tr><th>Name of Attribute</th><th style="text-align: center">Container Support</th><th style="text-align: center">Field Support</th></tr></thead><tbody>
|
||||||
<tr><td>context</td><td style="text-align: center">✔</td><td style="text-align: center">?</td></tr>
|
<tr><td>context</td><td style="text-align: center">✔</td><td style="text-align: center">?</td></tr>
|
||||||
<tr><td>deprecated</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
<tr><td>deprecated</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
||||||
<tr><td>description</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
<tr><td>description</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
||||||
|
@ -1353,7 +1353,7 @@ enum StarWarsEpisode {
|
||||||
<tr><td>skip</td><td style="text-align: center">?</td><td style="text-align: center">✘</td></tr>
|
<tr><td>skip</td><td style="text-align: center">?</td><td style="text-align: center">✘</td></tr>
|
||||||
<tr><td>✔: supported</td><td style="text-align: center">✘: not supported</td><td style="text-align: center">?: not available</td></tr>
|
<tr><td>✔: supported</td><td style="text-align: center">✘: not supported</td><td style="text-align: center">?: not available</td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
<div style="break-before: page; page-break-before: always;"></div><h1 id="interfaces"><a class="header" href="#interfaces">Interfaces</a></h1>
|
</div><div style="break-before: page; page-break-before: always;"></div><h1 id="interfaces"><a class="header" href="#interfaces">Interfaces</a></h1>
|
||||||
<p><a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> map well to interfaces known from common object-oriented languages such as Java or C#, but Rust, unfortunately, has no concept that maps perfectly to them. The nearest analogue of <a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> are Rust traits, and the main difference is that in GraphQL an <a href="https://spec.graphql.org/October2021#sec-Interfaces">interface type</a> serves both as an <em>abstraction</em> and a <em>boxed value (downcastable to concrete implementers)</em>, while in Rust, a trait is an <em>abstraction only</em> and <em>to represent such a boxed value a separate type is required</em>, like enum or trait object, because Rust trait doesn't represent a type itself, and so can have no values. This difference imposes some unintuitive and non-obvious corner cases when we try to express <a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> in Rust, but on the other hand gives you full control over which type is backing your interface, and how it's resolved.</p>
|
<p><a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> map well to interfaces known from common object-oriented languages such as Java or C#, but Rust, unfortunately, has no concept that maps perfectly to them. The nearest analogue of <a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> are Rust traits, and the main difference is that in GraphQL an <a href="https://spec.graphql.org/October2021#sec-Interfaces">interface type</a> serves both as an <em>abstraction</em> and a <em>boxed value (downcastable to concrete implementers)</em>, while in Rust, a trait is an <em>abstraction only</em> and <em>to represent such a boxed value a separate type is required</em>, like enum or trait object, because Rust trait doesn't represent a type itself, and so can have no values. This difference imposes some unintuitive and non-obvious corner cases when we try to express <a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> in Rust, but on the other hand gives you full control over which type is backing your interface, and how it's resolved.</p>
|
||||||
<p>For implementing <a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> Juniper provides the <code>#[graphql_interface]</code> macro.</p>
|
<p>For implementing <a href="https://spec.graphql.org/October2021#sec-Interfaces">GraphQL interfaces</a> Juniper provides the <code>#[graphql_interface]</code> macro.</p>
|
||||||
<h2 id="traits"><a class="header" href="#traits">Traits</a></h2>
|
<h2 id="traits"><a class="header" href="#traits">Traits</a></h2>
|
||||||
|
|
|
@ -81,8 +81,6 @@
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
background: #1d1f21;
|
background: #1d1f21;
|
||||||
color: #c5c8c6;
|
color: #c5c8c6;
|
||||||
padding: 0.5em;
|
|
||||||
-webkit-text-size-adjust: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.coffeescript .javascript,
|
.coffeescript .javascript,
|
||||||
|
|
|
@ -184,7 +184,7 @@ enum StarWarsEpisode {
|
||||||
<span class="boring">fn main() {}
|
<span class="boring">fn main() {}
|
||||||
</span></code></pre></pre>
|
</span></code></pre></pre>
|
||||||
<h2 id="supported-macro-attributes-derive"><a class="header" href="#supported-macro-attributes-derive">Supported Macro Attributes (Derive)</a></h2>
|
<h2 id="supported-macro-attributes-derive"><a class="header" href="#supported-macro-attributes-derive">Supported Macro Attributes (Derive)</a></h2>
|
||||||
<table><thead><tr><th>Name of Attribute</th><th style="text-align: center">Container Support</th><th style="text-align: center">Field Support</th></tr></thead><tbody>
|
<div class="table-wrapper"><table><thead><tr><th>Name of Attribute</th><th style="text-align: center">Container Support</th><th style="text-align: center">Field Support</th></tr></thead><tbody>
|
||||||
<tr><td>context</td><td style="text-align: center">✔</td><td style="text-align: center">?</td></tr>
|
<tr><td>context</td><td style="text-align: center">✔</td><td style="text-align: center">?</td></tr>
|
||||||
<tr><td>deprecated</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
<tr><td>deprecated</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
||||||
<tr><td>description</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
<tr><td>description</td><td style="text-align: center">✔</td><td style="text-align: center">✔</td></tr>
|
||||||
|
@ -195,7 +195,7 @@ enum StarWarsEpisode {
|
||||||
<tr><td>skip</td><td style="text-align: center">?</td><td style="text-align: center">✘</td></tr>
|
<tr><td>skip</td><td style="text-align: center">?</td><td style="text-align: center">✘</td></tr>
|
||||||
<tr><td>✔: supported</td><td style="text-align: center">✘: not supported</td><td style="text-align: center">?: not available</td></tr>
|
<tr><td>✔: supported</td><td style="text-align: center">✘: not supported</td><td style="text-align: center">?: not available</td></tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<nav class="nav-wrapper" aria-label="Page navigation">
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||||
|
|
Loading…
Reference in a new issue