Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb13bce

Browse files
committed
rebuild pages atf37823b
1 parentce602fa commitfb13bce

File tree

12 files changed

+123
-65
lines changed

12 files changed

+123
-65
lines changed

‎doc/implementors/core/error/trait.Error.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function(){varimplementors={};
2-
implementors['r2d2_postgres']=["<a class='stabilityUnstable' title='Unstable: the exact API of this trait may change'></a>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/error/trait.Error.html' title='core::error::Error'>Error</a> for <a class='enum' href='r2d2_postgres/enum.Error.html' title='r2d2_postgres::Error'>Error</a>",];
2+
implementors['r2d2_postgres']=["<a class='stabilityStable' title='Stable'></a>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/error/trait.Error.html' title='core::error::Error'>Error</a> for <a class='enum' href='r2d2_postgres/enum.Error.html' title='r2d2_postgres::Error'>Error</a>",];
33

44
if(window.register_implementors){
55
window.register_implementors(implementors);

‎doc/main.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ h2 {
8383
h3 {
8484
font-size:1.3em;
8585
}
86-
h1,h2,h3:not(.impl):not(.method):not(.type),h4:not(.method):not(.type) {
86+
h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod) {
8787
color: black;
8888
font-weight:500;
8989
margin:20px015px0;
@@ -93,7 +93,7 @@ h1.fqn {
9393
border-bottom:1px dashed#D5D5D5;
9494
margin-top:0;
9595
}
96-
h2,h3:not(.impl):not(.method):not(.type),h4:not(.method):not(.type) {
96+
h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod) {
9797
border-bottom:1px solid#DDDDDD;
9898
}
9999
h3.impl,h3.method,h4.method,h3.type,h4.type {

‎doc/main.js‎

Lines changed: 100 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@
1515
"use strict";
1616
varresizeTimeout,interval;
1717

18+
// This mapping table should match the discriminants of
19+
// `rustdoc::html::item_type::ItemType` type in Rust.
20+
varitemTypes=["mod",
21+
"externcrate",
22+
"import",
23+
"struct",
24+
"enum",
25+
"fn",
26+
"type",
27+
"static",
28+
"trait",
29+
"impl",
30+
"tymethod",
31+
"method",
32+
"structfield",
33+
"variant",
34+
"macro",
35+
"primitive",
36+
"associatedtype",
37+
"constant"];
38+
1839
$('.js-only').removeClass('js-only');
1940

2041
functiongetQueryStringParams(){
@@ -33,23 +54,6 @@
3354
returnwindow.history&&typeofwindow.history.pushState==="function";
3455
}
3556

36-
functionresizeShortBlocks(){
37-
if(resizeTimeout){
38-
clearTimeout(resizeTimeout);
39-
}
40-
resizeTimeout=setTimeout(function(){
41-
varcontentWidth=$('.content').width();
42-
$('.docblock.short').width(function(){
43-
returncontentWidth-40-$(this).prev().width();
44-
}).addClass('nowrap');
45-
$('.summary-column').width(function(){
46-
returncontentWidth-40-$(this).prev().width();
47-
})
48-
},150);
49-
}
50-
resizeShortBlocks();
51-
$(window).on('resize',resizeShortBlocks);
52-
5357
functionhighlightSourceLines(ev){
5458
vari,from,to,match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);
5559
if(match){
@@ -205,6 +209,33 @@
205209
break;
206210
}
207211
}
212+
// searching by type
213+
}elseif(val.search("->")>-1){
214+
vartrimmer=function(s){returns.trim();};
215+
varparts=val.split("->").map(trimmer);
216+
varinput=parts[0];
217+
// sort inputs so that order does not matter
218+
varinputs=input.split(",").map(trimmer).sort();
219+
varoutput=parts[1];
220+
221+
for(vari=0;i<nSearchWords;++i){
222+
vartype=searchIndex[i].type;
223+
if(!type){
224+
continue;
225+
}
226+
227+
// sort index inputs so that order does not matter
228+
vartypeInputs=type.inputs.map(function(input){
229+
returninput.name;
230+
}).sort();
231+
232+
// allow searching for void (no output) functions as well
233+
vartypeOutput=type.output ?type.output.name :"";
234+
if(inputs.toString()===typeInputs.toString()&&
235+
output==typeOutput){
236+
results.push({id:i,index:-1,dontValidate:true});
237+
}
238+
}
208239
}else{
209240
// gather matching search results up to a certain maximum
210241
val=val.replace(/\_/g,"");
@@ -325,6 +356,11 @@
325356
path=result.item.path.toLowerCase(),
326357
parent=result.item.parent;
327358

359+
// this validation does not make sense when searching by types
360+
if(result.dontValidate){
361+
continue;
362+
}
363+
328364
varvalid=validateResult(name,path,split,parent);
329365
if(!valid){
330366
result.id=-1;
@@ -552,27 +588,6 @@
552588
showResults(results);
553589
}
554590

555-
// This mapping table should match the discriminants of
556-
// `rustdoc::html::item_type::ItemType` type in Rust.
557-
varitemTypes=["mod",
558-
"externcrate",
559-
"import",
560-
"struct",
561-
"enum",
562-
"fn",
563-
"type",
564-
"static",
565-
"trait",
566-
"impl",
567-
"tymethod",
568-
"method",
569-
"structfield",
570-
"variant",
571-
"macro",
572-
"primitive",
573-
"associatedtype",
574-
"constant"];
575-
576591
functionitemTypeFromName(typename){
577592
for(vari=0;i<itemTypes.length;++i){
578593
if(itemTypes[i]===typename)returni;
@@ -590,7 +605,8 @@
590605
// (String) name,
591606
// (String) full path or empty string for previous path,
592607
// (String) description,
593-
// (optional Number) the parent path index to `paths`]
608+
// (Number | null) the parent path index to `paths`]
609+
// (Object | null) the type of the function (if any)
594610
varitems=rawSearchIndex[crate].items;
595611
// an array of [(Number) item type,
596612
// (String) name]
@@ -615,7 +631,7 @@
615631
varrawRow=items[i];
616632
varrow={crate:crate,ty:rawRow[0],name:rawRow[1],
617633
path:rawRow[2]||lastPath,desc:rawRow[3],
618-
parent:paths[rawRow[4]]};
634+
parent:paths[rawRow[4]],type:rawRow[5]};
619635
searchIndex.push(row);
620636
if(typeofrow.name==="string"){
621637
varword=row.name.toLowerCase();
@@ -708,6 +724,50 @@
708724

709725
window.initSearch=initSearch;
710726

727+
// delayed sidebar rendering.
728+
functioninitSidebarItems(items){
729+
varsidebar=$('.sidebar');
730+
varcurrent=window.sidebarCurrent;
731+
732+
functionblock(shortty,longty){
733+
varfiltered=items[shortty];
734+
if(!filtered)return;
735+
736+
vardiv=$('<div>').attr('class','block '+shortty);
737+
div.append($('<h2>').text(longty));
738+
739+
for(vari=0;i<filtered.length;++i){
740+
varitem=filtered[i];
741+
varname=item[0];
742+
vardesc=item[1];// can be null
743+
744+
varklass=shortty;
745+
if(name===current.name&&shortty==current.ty){
746+
klass+=' current';
747+
}
748+
varpath;
749+
if(shortty==='mod'){
750+
path=name+'/index.html';
751+
}else{
752+
path=shortty+'.'+name+'.html';
753+
}
754+
div.append($('<a>',{'href':current.relpath+path,
755+
'title':desc,
756+
'class':klass}).text(name));
757+
}
758+
sidebar.append(div);
759+
}
760+
761+
block("mod","Modules");
762+
block("struct","Structs");
763+
block("enum","Enums");
764+
block("trait","Traits");
765+
block("fn","Functions");
766+
block("macro","Macros");
767+
}
768+
769+
window.initSidebarItems=initSidebarItems;
770+
711771
window.register_implementors=function(imp){
712772
varlist=$('#implementors-list');
713773
varlibs=Object.getOwnPropertyNames(imp);

‎doc/playpen.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
if(window.playgroundUrl){
1616
$('pre.rust').hover(function(){
1717
vara=$('<a>').text('⇱').attr('class','test-arrow');
18-
varcode=$(this).siblings(".rusttest").text();
18+
varcode=$(this).prev(".rusttest").text();
1919
a.attr('href',window.playgroundUrl+'?code='+
2020
encodeURIComponent(code));
2121
a.attr('target','_blank');
@@ -25,4 +25,3 @@
2525
});
2626
}
2727
}());
28-

‎doc/r2d2_postgres/enum.Error.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<sectionclass="sidebar">
2828

29-
<pclass='location'><ahref='index.html'>r2d2_postgres</a></p><divclass='block struct'><h2>Structs</h2><aclass='struct'href='struct.PostgresConnectionManager.html'title='An `r2d2::ConnectionManager` for `postgres::Connection`s.'>PostgresConnectionManager</a></div><divclass='block enum'><h2>Enums</h2><aclass='enum current'href='enum.Error.html'title='A unified enum of errors returned by postgres::Connection'>Error</a></div>
29+
<pclass='location'><ahref='index.html'>r2d2_postgres</a></p><script>window.sidebarCurrent={name:'Error',ty:'enum',relpath:''};</script><scriptdefersrc="sidebar-items.js"></script>
3030
</section>
3131

3232
<navclass="sub">
@@ -43,7 +43,7 @@
4343
<sectionid='main'class="content enum">
4444
<h1class='fqn'><spanclass='in-band'>Enum<ahref='index.html'>r2d2_postgres</a>::<wbr><aclass='enum'href=''>Error</a><wbr></span><spanclass='out-of-band'><spanid='render-detail'>
4545
<aid="collapse-all"href="#">[-]</a>&nbsp;<aid="expand-all"href="#">[+]</a>
46-
</span><aid='src-12'href='../src/r2d2_postgres/lib.rs.html#15-20'>[src]</a></span></h1>
46+
</span><aid='src-12'href='../src/r2d2_postgres/lib.rs.html#14-19'>[src]</a></span></h1>
4747
<preclass='rust enum'>pub enum Error {
4848
Connect(<aclass='enum'href='https://sfackler.github.io/rust-postgres/doc/postgres/error/enum.ConnectError.html'title='postgres::error::ConnectError'>ConnectError</a>),
4949
Other(<aclass='enum'href='https://sfackler.github.io/rust-postgres/doc/postgres/error/enum.Error.html'title='postgres::error::Error'>Error</a>),
@@ -52,8 +52,8 @@ <h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>r2d2_postgres</a
5252
<table><tr><tdid='variant.Connect'><aclass='stability Unmarked'title='No stability level'></a><code>Connect</code></td><td><divclass='docblock'><p>A postgres::ConnectError</p>
5353
</div></td></tr><tr><tdid='variant.Other'><aclass='stability Unmarked'title='No stability level'></a><code>Other</code></td><td><divclass='docblock'><p>An postgres::Error</p>
5454
</div></td></tr></table><h2id='implementations'>Trait Implementations</h2><h3class='impl'><aclass='stability Stable'title='Stable'></a><code>impl<aclass='trait'href='http://doc.rust-lang.org/nightly/core/fmt/trait.Display.html'title='core::fmt::Display'>Display</a> for<aclass='enum'href='../r2d2_postgres/enum.Error.html'title='r2d2_postgres::Error'>Error</a></code></h3><divclass='impl-items'><h4id='method.fmt'class='method'><aclass='stability Stable'title='Stable'></a><code>fn<ahref='#method.fmt'class='fnname'>fmt</a>(&amp;self, fmt: &amp;mut<aclass='struct'href='http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html'title='core::fmt::Formatter'>Formatter</a>) -&gt;<aclass='type'href='http://doc.rust-lang.org/nightly/core/fmt/type.Result.html'title='core::fmt::Result'>Result</a></code></h4>
55-
</div><h3class='impl'><aclass='stabilityUnstable'title='Unstable: the exact API of this trait may change'></a><code>impl<aclass='trait'href='http://doc.rust-lang.org/nightly/core/error/trait.Error.html'title='core::error::Error'>Error</a> for<aclass='enum'href='../r2d2_postgres/enum.Error.html'title='r2d2_postgres::Error'>Error</a></code></h3><divclass='impl-items'><h4id='method.description'class='method'><aclass='stabilityUnstable'title='Unstable: the exact API of this trait may change'></a><code>fn<ahref='#method.description'class='fnname'>description</a>(&amp;self) -&gt; &amp;<ahref='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
56-
<h4id='method.cause'class='method'><aclass='stabilityUnstable'title='Unstable: the exact API of this trait may change'></a><code>fn<ahref='#method.cause'class='fnname'>cause</a>(&amp;self) -&gt;<aclass='enum'href='http://doc.rust-lang.org/nightly/core/option/enum.Option.html'title='core::option::Option'>Option</a>&lt;&amp;<aclass='trait'href='http://doc.rust-lang.org/nightly/core/error/trait.Error.html'title='core::error::Error'>Error</a>&gt;</code></h4>
55+
</div><h3class='impl'><aclass='stabilityStable'title='Stable'></a><code>impl<aclass='trait'href='http://doc.rust-lang.org/nightly/core/error/trait.Error.html'title='core::error::Error'>Error</a> for<aclass='enum'href='../r2d2_postgres/enum.Error.html'title='r2d2_postgres::Error'>Error</a></code></h3><divclass='impl-items'><h4id='method.description'class='method'><aclass='stabilityStable'title='Stable'></a><code>fn<ahref='#method.description'class='fnname'>description</a>(&amp;self) -&gt; &amp;<ahref='http://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
56+
<h4id='method.cause'class='method'><aclass='stabilityStable'title='Stable'></a><code>fn<ahref='#method.cause'class='fnname'>cause</a>(&amp;self) -&gt;<aclass='enum'href='http://doc.rust-lang.org/nightly/core/option/enum.Option.html'title='core::option::Option'>Option</a>&lt;&amp;<aclass='trait'href='http://doc.rust-lang.org/nightly/core/error/trait.Error.html'title='core::error::Error'>Error</a>&gt;</code></h4>
5757
</div><h3id='derived_implementations'>Derived Implementations</h3><h3class='impl'><aclass='stability Stable'title='Stable'></a><code>impl<aclass='trait'href='http://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html'title='core::fmt::Debug'>Debug</a> for<aclass='enum'href='../r2d2_postgres/enum.Error.html'title='r2d2_postgres::Error'>Error</a></code></h3><divclass='impl-items'><h4id='method.fmt'class='method'><aclass='stability Stable'title='Stable'></a><code>fn<ahref='#method.fmt'class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut<aclass='struct'href='http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html'title='core::fmt::Formatter'>Formatter</a>) -&gt;<aclass='type'href='http://doc.rust-lang.org/nightly/core/fmt/type.Result.html'title='core::fmt::Result'>Result</a></code></h4>
5858
</div><h3class='impl'><aclass='stability Stable'title='Stable'></a><code>impl<aclass='trait'href='http://doc.rust-lang.org/nightly/core/clone/trait.Clone.html'title='core::clone::Clone'>Clone</a> for<aclass='enum'href='../r2d2_postgres/enum.Error.html'title='r2d2_postgres::Error'>Error</a></code></h3><divclass='impl-items'><h4id='method.clone'class='method'><aclass='stability Stable'title='Stable'></a><code>fn<ahref='#method.clone'class='fnname'>clone</a>(&amp;self) -&gt;<aclass='enum'href='../r2d2_postgres/enum.Error.html'title='r2d2_postgres::Error'>Error</a></code></h4>
5959
<h4id='method.clone_from'class='tymethod'><aclass='stability Unstable'title='Unstable: this function is rarely used'></a><code>fn<ahref='#tymethod.clone_from'class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>

‎doc/r2d2_postgres/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<sectionclass="sidebar">
2828

29-
<pclass='location'></p>
29+
<pclass='location'></p><script>window.sidebarCurrent={name:'r2d2_postgres',ty:'mod',relpath:'../'};</script>
3030
</section>
3131

3232
<navclass="sub">
@@ -43,7 +43,7 @@
4343
<sectionid='main'class="content mod">
4444
<h1class='fqn'><spanclass='in-band'>Crate<aclass='mod'href=''>r2d2_postgres</a><wbr></span><spanclass='out-of-band'><ahref='stability.html'>[stability]</a><spanid='render-detail'>
4545
<aid="collapse-all"href="#">[-]</a>&nbsp;<aid="expand-all"href="#">[+]</a>
46-
</span><aid='src-0'href='../src/r2d2_postgres/lib.rs.html#1-121'>[src]</a></span></h1>
46+
</span><aid='src-0'href='../src/r2d2_postgres/lib.rs.html#1-120'>[src]</a></span></h1>
4747
<divclass='docblock'><p>Postgres support for the<code>r2d2</code> connection pool.</p>
4848
</div><h2id='structs'class='section-header'><ahref="#structs">Structs</a></h2>
4949
<table>

‎doc/r2d2_postgres/sidebar-items.js‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎doc/r2d2_postgres/stability.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<sectionclass="sidebar">
2828

29-
<pclass='location'></p>
29+
<pclass='location'></p><script>window.sidebarCurrent={name:'r2d2_postgres',ty:'mod',relpath:'../'};</script>
3030
</section>
3131

3232
<navclass="sub">
@@ -45,13 +45,13 @@
4545
the crate, according to the total number of items at each level in the module and
4646
its children (percentages total for r2d2_postgres):
4747
<blockquote>
48-
<aclass='stability Stable'></a> stable (30%),<br/>
49-
<aclass='stability Unstable'></a> unstable (7%),<br/>
48+
<aclass='stability Stable'></a> stable (38%),<br/>
49+
<aclass='stability Unstable'></a> unstable (0%),<br/>
5050
<aclass='stability Deprecated'></a> deprecated (0%),<br/>
5151
<aclass='stability Unmarked'></a> unmarked (61%)
5252
</blockquote>
5353
The counts do not include methods or trait
54-
implementations that are visible only through a re-exported type.<table><tr><td><ahref='index.html'>r2d2_postgres</a></td><tdclass='summary-column'><spanclass='summary Stable'style='width:30.7692%; display: inline-block'>&nbsp</span><spanclass='summary Unstable'style='width:7.6923%; display: inline-block'>&nbsp</span><spanclass='summary Deprecated'style='width: 0.0000%; display: inline-block'>&nbsp</span><spanclass='summary Unmarked'style='width: 61.5385%; display: inline-block'>&nbsp</span></td></tr></table></section>
54+
implementations that are visible only through a re-exported type.<table><tr><td><ahref='index.html'>r2d2_postgres</a></td><tdclass='summary-column'><spanclass='summary Stable'style='width:38.4615%; display: inline-block'>&nbsp</span><spanclass='summary Unstable'style='width:0.0000%; display: inline-block'>&nbsp</span><spanclass='summary Deprecated'style='width: 0.0000%; display: inline-block'>&nbsp</span><spanclass='summary Unmarked'style='width: 61.5385%; display: inline-block'>&nbsp</span></td></tr></table></section>
5555
<sectionid='search'class="content hidden"></section>
5656

5757
<sectionclass="footer"></section>

‎doc/r2d2_postgres/stability.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"r2d2_postgres","counts":{"deprecated":0,"unstable":1,"stable":4,"unmarked":8},"submodules":[]}
1+
{"name":"r2d2_postgres","counts":{"deprecated":0,"unstable":0,"stable":5,"unmarked":8},"submodules":[]}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp