Update documentation for Juniper
This commit is contained in:
parent
580776b72e
commit
95d942c9d4
20940 changed files with 799705 additions and 0 deletions
64
COPYRIGHT.txt
Normal file
64
COPYRIGHT.txt
Normal file
|
@ -0,0 +1,64 @@
|
|||
These documentation pages include resources by third parties. This copyright
|
||||
file applies only to those resources. The following third party resources are
|
||||
included, and carry their own copyright notices and license terms:
|
||||
|
||||
* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff):
|
||||
|
||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
||||
with Reserved Font Name Fira Sans.
|
||||
|
||||
Copyright (c) 2014, Telefonica S.A.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See FiraSans-LICENSE.txt.
|
||||
|
||||
* Heuristica (Heuristica-Italic.woff):
|
||||
|
||||
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
|
||||
Utopia is either a registered trademark or trademark of Adobe Systems
|
||||
Incorporated in the United States and/or other countries. Used under
|
||||
license.
|
||||
|
||||
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
|
||||
|
||||
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
|
||||
with Reserved Font Name Heuristica.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See Heuristica-LICENSE.txt.
|
||||
|
||||
* jQuery (jquery-2.1.4.min.js):
|
||||
|
||||
Copyright 2005, 2015 jQuery Foundation, Inc.
|
||||
Licensed under the MIT license (see LICENSE-MIT.txt).
|
||||
|
||||
* rustdoc.css, main.js, and playpen.js:
|
||||
|
||||
Copyright 2015 The Rust Developers.
|
||||
Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
|
||||
the MIT license (LICENSE-MIT.txt) at your option.
|
||||
|
||||
* normalize.css:
|
||||
|
||||
Copyright (c) Nicolas Gallagher and Jonathan Neal.
|
||||
Licensed under the MIT license (see LICENSE-MIT.txt).
|
||||
|
||||
* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff):
|
||||
|
||||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
|
||||
with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
|
||||
of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See SourceCodePro-LICENSE.txt.
|
||||
|
||||
* Source Serif Pro (SourceSerifPro-Regular.woff, SourceSerifPro-Bold.woff):
|
||||
|
||||
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with
|
||||
Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of
|
||||
Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
Licensed under the SIL Open Font License, Version 1.1.
|
||||
See SourceSerifPro-LICENSE.txt.
|
||||
|
||||
This copyright file is intended to be distributed with rustdoc output.
|
99
FiraSans-LICENSE.txt
Normal file
99
FiraSans-LICENSE.txt
Normal file
|
@ -0,0 +1,99 @@
|
|||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
||||
with Reserved Font Name Fira Sans.
|
||||
|
||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
||||
with Reserved Font Name Fira Mono.
|
||||
|
||||
Copyright (c) 2014, Telefonica S.A.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
FiraSans-Medium.woff
Normal file
BIN
FiraSans-Medium.woff
Normal file
Binary file not shown.
BIN
FiraSans-Regular.woff
Normal file
BIN
FiraSans-Regular.woff
Normal file
Binary file not shown.
BIN
Heuristica-Italic.woff
Normal file
BIN
Heuristica-Italic.woff
Normal file
Binary file not shown.
101
Heuristica-LICENSE.txt
Normal file
101
Heuristica-LICENSE.txt
Normal file
|
@ -0,0 +1,101 @@
|
|||
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
|
||||
Utopia is either a registered trademark or trademark of Adobe Systems
|
||||
Incorporated in the United States and/or other countries. Used under
|
||||
license.
|
||||
|
||||
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
|
||||
|
||||
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
|
||||
with Reserved Font Name Heuristica.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
201
LICENSE-APACHE.txt
Normal file
201
LICENSE-APACHE.txt
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
23
LICENSE-MIT.txt
Normal file
23
LICENSE-MIT.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
93
SourceCodePro-LICENSE.txt
Normal file
93
SourceCodePro-LICENSE.txt
Normal file
|
@ -0,0 +1,93 @@
|
|||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
SourceCodePro-Regular.woff
Normal file
BIN
SourceCodePro-Regular.woff
Normal file
Binary file not shown.
BIN
SourceCodePro-Semibold.woff
Normal file
BIN
SourceCodePro-Semibold.woff
Normal file
Binary file not shown.
BIN
SourceSerifPro-Bold.woff
Normal file
BIN
SourceSerifPro-Bold.woff
Normal file
Binary file not shown.
93
SourceSerifPro-LICENSE.txt
Normal file
93
SourceSerifPro-LICENSE.txt
Normal file
|
@ -0,0 +1,93 @@
|
|||
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
SourceSerifPro-Regular.woff
Normal file
BIN
SourceSerifPro-Regular.woff
Normal file
Binary file not shown.
124
bitflags/index.html
Normal file
124
bitflags/index.html
Normal file
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `bitflags` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, bitflags">
|
||||
|
||||
<title>bitflags - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'bitflags', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>bitflags</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/bitflags/lib.rs.html#11-808' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>A typesafe bitmask flag generator.</p>
|
||||
</div><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='macro' href='macro.bitflags!.html'
|
||||
title='bitflags::bitflags!'>bitflags!</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The <code>bitflags!</code> macro generates a <code>struct</code> that holds a set of C-style
|
||||
bitmask flags. It is useful for creating typesafe wrappers for C APIs.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bitflags";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
279
bitflags/macro.bitflags!.html
Normal file
279
bitflags/macro.bitflags!.html
Normal file
|
@ -0,0 +1,279 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `bitflags!` macro in crate `bitflags`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, bitflags!">
|
||||
|
||||
<title>bitflags::bitflags! - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>bitflags</a></p><script>window.sidebarCurrent = {name: 'bitflags!', ty: 'macro', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content macro">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>bitflags</a>::<wbr><a class='macro' href=''>bitflags!</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-5' class='srclink' href='../src/bitflags/lib.rs.html#178-496' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust macro'>
|
||||
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>bitflags</span> {
|
||||
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>pub</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>
|
||||
}) <span class='op'>=></span> { ... };
|
||||
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>
|
||||
}) <span class='op'>=></span> { ... };
|
||||
(@<span class='ident'>_impl</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>
|
||||
}) <span class='op'>=></span> { ... };
|
||||
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>pub</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>,
|
||||
}) <span class='op'>=></span> { ... };
|
||||
($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='ident'>flags</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>BitFlags</span>:<span class='ident'>ident</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>T</span>:<span class='ident'>ty</span> {
|
||||
$($(<span class='attribute'>#[<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag_attr</span>:<span class='ident'>meta</span>]</span>)<span class='op'>*</span> <span class='kw'>const</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>Flag</span>:<span class='ident'>ident</span> <span class='op'>=</span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>value</span>:<span class='ident'>expr</span>),<span class='op'>+</span>,
|
||||
}) <span class='op'>=></span> { ... };
|
||||
}</pre>
|
||||
<div class='docblock'><p>The <code>bitflags!</code> macro generates a <code>struct</code> that holds a set of C-style
|
||||
bitmask flags. It is useful for creating typesafe wrappers for C APIs.</p>
|
||||
|
||||
<p>The flags should only be defined for integer types, otherwise unexpected
|
||||
type errors may occur at compile time.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span>
|
||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>bitflags</span>;
|
||||
|
||||
<span class='macro'>bitflags</span><span class='macro'>!</span> {
|
||||
<span class='ident'>flags</span> <span class='ident'>Flags</span>: <span class='ident'>u32</span> {
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_C</span> <span class='op'>=</span> <span class='number'>0b00000100</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_ABC</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span>.<span class='ident'>bits</span>
|
||||
<span class='op'>|</span> <span class='ident'>FLAG_B</span>.<span class='ident'>bits</span>
|
||||
<span class='op'>|</span> <span class='ident'>FLAG_C</span>.<span class='ident'>bits</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>fn</span> <span class='ident'>main</span>() {
|
||||
<span class='kw'>let</span> <span class='ident'>e1</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_C</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>e2</span> <span class='op'>=</span> <span class='ident'>FLAG_B</span> <span class='op'>|</span> <span class='ident'>FLAG_C</span>;
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='op'>|</span> <span class='ident'>e2</span>), <span class='ident'>FLAG_ABC</span>); <span class='comment'>// union</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='kw-2'>&</span> <span class='ident'>e2</span>), <span class='ident'>FLAG_C</span>); <span class='comment'>// intersection</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>((<span class='ident'>e1</span> <span class='op'>-</span> <span class='ident'>e2</span>), <span class='ident'>FLAG_A</span>); <span class='comment'>// set difference</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='op'>!</span><span class='ident'>e2</span>, <span class='ident'>FLAG_A</span>); <span class='comment'>// set complement</span>
|
||||
}</pre>
|
||||
|
||||
<p>The generated <code>struct</code>s can also be extended with type and trait
|
||||
implementations:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span>
|
||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>bitflags</span>;
|
||||
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>fmt</span>;
|
||||
|
||||
<span class='macro'>bitflags</span><span class='macro'>!</span> {
|
||||
<span class='ident'>flags</span> <span class='ident'>Flags</span>: <span class='ident'>u32</span> {
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>impl</span> <span class='ident'>Flags</span> {
|
||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>clear</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='self'>self</span>) {
|
||||
<span class='self'>self</span>.<span class='ident'>bits</span> <span class='op'>=</span> <span class='number'>0</span>; <span class='comment'>// The `bits` field can be accessed from within the</span>
|
||||
<span class='comment'>// same module where the `bitflags!` macro was invoked.</span>
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>impl</span> <span class='ident'>fmt</span>::<span class='ident'>Display</span> <span class='kw'>for</span> <span class='ident'>Flags</span> {
|
||||
<span class='kw'>fn</span> <span class='ident'>fmt</span>(<span class='kw-2'>&</span><span class='self'>self</span>, <span class='ident'>f</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>fmt</span>::<span class='ident'>Formatter</span>) <span class='op'>-></span> <span class='ident'>fmt</span>::<span class='prelude-ty'>Result</span> {
|
||||
<span class='macro'>write</span><span class='macro'>!</span>(<span class='ident'>f</span>, <span class='string'>"hi!"</span>)
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>fn</span> <span class='ident'>main</span>() {
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>flags</span> <span class='op'>=</span> <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_B</span>;
|
||||
<span class='ident'>flags</span>.<span class='ident'>clear</span>();
|
||||
<span class='macro'>assert</span><span class='macro'>!</span>(<span class='ident'>flags</span>.<span class='ident'>is_empty</span>());
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{}"</span>, <span class='ident'>flags</span>), <span class='string'>"hi!"</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>FLAG_A</span> <span class='op'>|</span> <span class='ident'>FLAG_B</span>), <span class='string'>"FLAG_A | FLAG_B"</span>);
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>"{:?}"</span>, <span class='ident'>FLAG_B</span>), <span class='string'>"FLAG_B"</span>);
|
||||
}</pre>
|
||||
|
||||
<h1 id='visibility' class='section-header'><a href='#visibility'>Visibility</a></h1>
|
||||
<p>The generated struct and its associated flag constants are not exported
|
||||
out of the current module by default. A definition can be exported out of
|
||||
the current module by adding <code>pub</code> before <code>flags</code>:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='attribute'>#[<span class='ident'>macro_use</span>]</span>
|
||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>bitflags</span>;
|
||||
|
||||
<span class='kw'>mod</span> <span class='ident'>example</span> {
|
||||
<span class='macro'>bitflags</span><span class='macro'>!</span> {
|
||||
<span class='kw'>pub</span> <span class='ident'>flags</span> <span class='ident'>Flags1</span>: <span class='ident'>u32</span> {
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_A</span> <span class='op'>=</span> <span class='number'>0b00000001</span>,
|
||||
}
|
||||
}
|
||||
<span class='macro'>bitflags</span><span class='macro'>!</span> {
|
||||
<span class='ident'>flags</span> <span class='ident'>Flags2</span>: <span class='ident'>u32</span> {
|
||||
<span class='kw'>const</span> <span class='ident'>FLAG_B</span> <span class='op'>=</span> <span class='number'>0b00000010</span>,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class='kw'>fn</span> <span class='ident'>main</span>() {
|
||||
<span class='kw'>let</span> <span class='ident'>flag1</span> <span class='op'>=</span> <span class='ident'>example</span>::<span class='ident'>FLAG_A</span>;
|
||||
<span class='kw'>let</span> <span class='ident'>flag2</span> <span class='op'>=</span> <span class='ident'>example</span>::<span class='ident'>FLAG_B</span>; <span class='comment'>// error: const `FLAG_B` is private</span>
|
||||
}</pre>
|
||||
|
||||
<h1 id='attributes' class='section-header'><a href='#attributes'>Attributes</a></h1>
|
||||
<p>Attributes can be attached to the generated <code>struct</code> by placing them
|
||||
before the <code>flags</code> keyword.</p>
|
||||
|
||||
<h1 id='trait-implementations' class='section-header'><a href='#trait-implementations'>Trait implementations</a></h1>
|
||||
<p>The <code>Copy</code>, <code>Clone</code>, <code>PartialEq</code>, <code>Eq</code>, <code>PartialOrd</code>, <code>Ord</code> and <code>Hash</code>
|
||||
traits automatically derived for the <code>struct</code> using the <code>derive</code> attribute.
|
||||
Additional traits can be derived by providing an explicit <code>derive</code>
|
||||
attribute on <code>flags</code>.</p>
|
||||
|
||||
<p>The <code>Extend</code> and <code>FromIterator</code> traits are implemented for the <code>struct</code>,
|
||||
too: <code>Extend</code> adds the union of the instances of the <code>struct</code> iterated over,
|
||||
while <code>FromIterator</code> calculates the union.</p>
|
||||
|
||||
<p>The <code>Debug</code> trait is also implemented by displaying the bits value of the
|
||||
internal struct.</p>
|
||||
|
||||
<h2 id='operators' class='section-header'><a href='#operators'>Operators</a></h2>
|
||||
<p>The following operator traits are implemented for the generated <code>struct</code>:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>BitOr</code> and <code>BitOrAssign</code>: union</li>
|
||||
<li><code>BitAnd</code> and <code>BitAndAssign</code>: intersection</li>
|
||||
<li><code>BitXor</code> and <code>BitXorAssign</code>: toggle</li>
|
||||
<li><code>Sub</code> and <code>SubAssign</code>: set difference</li>
|
||||
<li><code>Not</code>: set complement</li>
|
||||
</ul>
|
||||
|
||||
<p>As long as the assignment operators are unstable rust feature they are only
|
||||
available with the crate feature <code>assignment_ops</code> enabled.</p>
|
||||
|
||||
<h1 id='methods-1' class='section-header'><a href='#methods-1'>Methods</a></h1>
|
||||
<p>The following methods are defined for the generated <code>struct</code>:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>empty</code>: an empty set of flags</li>
|
||||
<li><code>all</code>: the set of all flags</li>
|
||||
<li><code>bits</code>: the raw value of the flags currently stored</li>
|
||||
<li><code>from_bits</code>: convert from underlying bit representation, unless that
|
||||
representation contains bits that do not correspond to a flag</li>
|
||||
<li><code>from_bits_truncate</code>: convert from underlying bit representation, dropping
|
||||
any bits that do not correspond to flags</li>
|
||||
<li><code>is_empty</code>: <code>true</code> if no flags are currently stored</li>
|
||||
<li><code>is_all</code>: <code>true</code> if all flags are currently set</li>
|
||||
<li><code>intersects</code>: <code>true</code> if there are flags common to both <code>self</code> and <code>other</code></li>
|
||||
<li><code>contains</code>: <code>true</code> all of the flags in <code>other</code> are contained within <code>self</code></li>
|
||||
<li><code>insert</code>: inserts the specified flags in-place</li>
|
||||
<li><code>remove</code>: removes the specified flags in-place</li>
|
||||
<li><code>toggle</code>: the specified flags will be inserted if not present, and removed
|
||||
if they are.</li>
|
||||
</ul>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "bitflags";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
bitflags/sidebar-items.js
Normal file
1
bitflags/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"macro":[["bitflags!","The `bitflags!` macro generates a `struct` that holds a set of C-style bitmask flags. It is useful for creating typesafe wrappers for C APIs."]]});
|
122
conduit_mime_types/index.html
Normal file
122
conduit_mime_types/index.html
Normal file
|
@ -0,0 +1,122 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `conduit_mime_types` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, conduit_mime_types">
|
||||
|
||||
<title>conduit_mime_types - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'conduit_mime_types', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>conduit_mime_types</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/conduit_mime_types/lib.rs.html#1-93' title='goto source code'>[src]</a></span></h1>
|
||||
<h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Types.html'
|
||||
title='conduit_mime_types::Types'>Types</a></td>
|
||||
<td class='docblock short'>
|
||||
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "conduit_mime_types";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
conduit_mime_types/sidebar-items.js
Normal file
1
conduit_mime_types/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"struct":[["Types",""]]});
|
135
conduit_mime_types/struct.Types.html
Normal file
135
conduit_mime_types/struct.Types.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Types` struct in crate `conduit_mime_types`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Types">
|
||||
|
||||
<title>conduit_mime_types::Types - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>conduit_mime_types</a></p><script>window.sidebarCurrent = {name: 'Types', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>conduit_mime_types</a>::<wbr><a class='struct' href=''>Types</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-42' class='srclink' href='../src/conduit_mime_types/lib.rs.html#13-16' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Types {
|
||||
// some fields omitted
|
||||
}</pre><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-45' class='srclink' href='../src/conduit_mime_types/lib.rs.html#18-50' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<h4 id='method.get_extension' class='method'><code>fn <a href='#method.get_extension' class='fnname'>get_extension</a><'a>(&'a self, name: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'a [</a><a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>></code></h4>
|
||||
<h4 id='method.get_mime_type' class='method'><code>fn <a href='#method.get_mime_type' class='fnname'>get_mime_type</a><'a>(&'a self, ext: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>></code></h4>
|
||||
<h4 id='method.mime_for_path' class='method'><code>fn <a href='#method.mime_for_path' class='fnname'>mime_for_path</a><'a>(&'a self, path: &<a class='struct' href='https://doc.rust-lang.org/nightly/std/path/struct.Path.html' title='std::path::Path'>Path</a>) -> &'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-10' class='srclink' href='../src/conduit_mime_types/lib.rs.html#12' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-25' class='srclink' href='../src/conduit_mime_types/lib.rs.html#12' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-30' class='srclink' href='../src/conduit_mime_types/lib.rs.html#12' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../conduit_mime_types/struct.Types.html' title='conduit_mime_types::Types'>Types</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-35' class='srclink' href='../src/conduit_mime_types/lib.rs.html#12' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "conduit_mime_types";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
136
cookie/index.html
Normal file
136
cookie/index.html
Normal file
|
@ -0,0 +1,136 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `cookie` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, cookie">
|
||||
|
||||
<title>cookie - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'cookie', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>cookie</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/cookie/lib.rs.html#1-332' title='goto source code'>[src]</a></span></h1>
|
||||
<h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.AttrVal.html'
|
||||
title='cookie::AttrVal'>AttrVal</a></td>
|
||||
<td class='docblock short'>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Cookie.html'
|
||||
title='cookie::Cookie'>Cookie</a></td>
|
||||
<td class='docblock short'>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.CookieJar.html'
|
||||
title='cookie::CookieJar'>CookieJar</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A jar of cookies for managing a session</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "cookie";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
10
cookie/jar/struct.CookieJar.html
Normal file
10
cookie/jar/struct.CookieJar.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../cookie/struct.CookieJar.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../cookie/struct.CookieJar.html">../../cookie/struct.CookieJar.html</a>...</p>
|
||||
<script>location.replace("../../cookie/struct.CookieJar.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
1
cookie/sidebar-items.js
Normal file
1
cookie/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"struct":[["AttrVal",""],["Cookie",""],["CookieJar","A jar of cookies for managing a session"]]});
|
117
cookie/struct.AttrVal.html
Normal file
117
cookie/struct.AttrVal.html
Normal file
|
@ -0,0 +1,117 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `AttrVal` struct in crate `cookie`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, AttrVal">
|
||||
|
||||
<title>cookie::AttrVal - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>cookie</a></p><script>window.sidebarCurrent = {name: 'AttrVal', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>cookie</a>::<wbr><a class='struct' href=''>AttrVal</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-352' class='srclink' href='../src/cookie/lib.rs.html#182' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct AttrVal<'a>(pub &'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, pub &'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>);</pre><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='../cookie/struct.AttrVal.html' title='cookie::AttrVal'>AttrVal</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-357' class='srclink' href='../src/cookie/lib.rs.html#184-192' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "cookie";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
158
cookie/struct.Cookie.html
Normal file
158
cookie/struct.Cookie.html
Normal file
|
@ -0,0 +1,158 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Cookie` struct in crate `cookie`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Cookie">
|
||||
|
||||
<title>cookie::Cookie - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>cookie</a></p><script>window.sidebarCurrent = {name: 'Cookie', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>cookie</a>::<wbr><a class='struct' href=''>Cookie</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-283' class='srclink' href='../src/cookie/lib.rs.html#21-31' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Cookie {
|
||||
pub name: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>,
|
||||
pub value: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>,
|
||||
pub expires: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='../time/struct.Tm.html' title='time::Tm'>Tm</a>>,
|
||||
pub max_age: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>>,
|
||||
pub domain: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>,
|
||||
pub path: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>,
|
||||
pub secure: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>,
|
||||
pub httponly: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>,
|
||||
pub custom: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/map/struct.BTreeMap.html' title='collections::btree::map::BTreeMap'>BTreeMap</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>>,
|
||||
}</pre><h2 class='fields'>Fields</h2><span id='structfield.name' class='structfield'><code>name: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code>
|
||||
</span><span class='stab '></span><span id='structfield.value' class='structfield'><code>value: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code>
|
||||
</span><span class='stab '></span><span id='structfield.expires' class='structfield'><code>expires: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='../time/struct.Tm.html' title='time::Tm'>Tm</a>></code>
|
||||
</span><span class='stab '></span><span id='structfield.max_age' class='structfield'><code>max_age: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>></code>
|
||||
</span><span class='stab '></span><span id='structfield.domain' class='structfield'><code>domain: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>></code>
|
||||
</span><span class='stab '></span><span id='structfield.path' class='structfield'><code>path: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>></code>
|
||||
</span><span class='stab '></span><span id='structfield.secure' class='structfield'><code>secure: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code>
|
||||
</span><span class='stab '></span><span id='structfield.httponly' class='structfield'><code>httponly: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code>
|
||||
</span><span class='stab '></span><span id='structfield.custom' class='structfield'><code>custom: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/btree/map/struct.BTreeMap.html' title='collections::btree::map::BTreeMap'>BTreeMap</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>></code>
|
||||
</span><span class='stab '></span><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-296' class='srclink' href='../src/cookie/lib.rs.html#40-146' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(name: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>, value: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>) -> <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></h4>
|
||||
<h4 id='method.parse' class='method'><code>fn <a href='#method.parse' class='fnname'>parse</a>(s: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<h4 id='method.pair' class='method'><code>fn <a href='#method.pair' class='fnname'>pair</a>(&self) -> <a class='struct' href='../cookie/struct.AttrVal.html' title='cookie::AttrVal'>AttrVal</a></code></h4>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-214' class='srclink' href='../src/cookie/lib.rs.html#19' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-228' class='srclink' href='../src/cookie/lib.rs.html#19' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-240' class='srclink' href='../src/cookie/lib.rs.html#19' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-367' class='srclink' href='../src/cookie/lib.rs.html#194-221' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html' title='core::str::FromStr'>FromStr</a> for <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-409' class='srclink' href='../src/cookie/lib.rs.html#223-228' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='associatedtype.Err' class='type'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class='type'>Err</a> = <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a></code></h4>
|
||||
<div class='docblock'><p>The associated error which can be returned from parsing.</p>
|
||||
</div><h4 id='method.from_str' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(s: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "cookie";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
201
cookie/struct.CookieJar.html
Normal file
201
cookie/struct.CookieJar.html
Normal file
|
@ -0,0 +1,201 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `CookieJar` struct in crate `cookie`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, CookieJar">
|
||||
|
||||
<title>cookie::CookieJar - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>cookie</a></p><script>window.sidebarCurrent = {name: 'CookieJar', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>cookie</a>::<wbr><a class='struct' href=''>CookieJar</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-16' class='srclink' href='../src/cookie/jar.rs.html#37-39' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct CookieJar<'a> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A jar of cookies for managing a session</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>cookie</span>::{<span class='ident'>Cookie</span>, <span class='ident'>CookieJar</span>};
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='ident'>CookieJar</span>::<span class='ident'>new</span>(<span class='string'>b"f8f9eaf1ecdedff5e5b749c58115441e"</span>);
|
||||
|
||||
<span class='comment'>// Add a cookie to this jar</span>
|
||||
<span class='ident'>c</span>.<span class='ident'>add</span>(<span class='ident'>Cookie</span>::<span class='ident'>new</span>(<span class='string'>"key"</span>.<span class='ident'>to_string</span>(), <span class='string'>"value"</span>.<span class='ident'>to_string</span>()));
|
||||
|
||||
<span class='comment'>// Remove the added cookie</span>
|
||||
<span class='ident'>c</span>.<span class='ident'>remove</span>(<span class='string'>"key"</span>);
|
||||
</pre>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='struct' href='../cookie/struct.CookieJar.html' title='cookie::CookieJar'>CookieJar</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-48' class='srclink' href='../src/cookie/jar.rs.html#90-319' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(key: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='struct' href='../cookie/struct.CookieJar.html' title='cookie::CookieJar'>CookieJar</a><'static></code></h4>
|
||||
<div class='docblock'><p>Creates a new empty cookie jar with the given signing key.</p>
|
||||
|
||||
<p>The given key is used to sign cookies in the signed cookie jar.</p>
|
||||
</div><h4 id='method.add_original' class='method'><code>fn <a href='#method.add_original' class='fnname'>add_original</a>(&mut self, cookie: <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>)</code></h4>
|
||||
<div class='docblock'><p>Adds an original cookie from a request.</p>
|
||||
|
||||
<p>This method only works on the root cookie jar and is not intended for
|
||||
use during the lifetime of a request, it is intended to initialize a
|
||||
cookie jar from an incoming request.</p>
|
||||
</div><h4 id='method.add' class='method'><code>fn <a href='#method.add' class='fnname'>add</a>(&self, cookie: <a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>)</code></h4>
|
||||
<div class='docblock'><p>Adds a new cookie to this cookie jar.</p>
|
||||
|
||||
<p>If this jar is a child cookie jar, this will walk up the chain of
|
||||
borrowed jars, modifying the cookie as it goes along.</p>
|
||||
</div><h4 id='method.remove' class='method'><code>fn <a href='#method.remove' class='fnname'>remove</a>(&self, cookie: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>)</code></h4>
|
||||
<div class='docblock'><p>Removes a cookie from this cookie jar.</p>
|
||||
</div><h4 id='method.find' class='method'><code>fn <a href='#method.find' class='fnname'>find</a>(&self, name: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>></code></h4>
|
||||
<div class='docblock'><p>Finds a cookie inside of this cookie jar.</p>
|
||||
|
||||
<p>The cookie is subject to modification by any of the child cookie jars
|
||||
that are currently borrowed. A copy of the cookie is returned.</p>
|
||||
</div><h4 id='method.signed' class='method'><code>fn <a href='#method.signed' class='fnname'>signed</a><'b>(&'b self) -> <a class='struct' href='../cookie/struct.CookieJar.html' title='cookie::CookieJar'>CookieJar</a><'b></code></h4>
|
||||
<div class='docblock'><p>Creates a child signed cookie jar.</p>
|
||||
|
||||
<p>All cookies read from the child jar will require a valid signature and
|
||||
all cookies written will be signed automatically.</p>
|
||||
|
||||
<h1 id='example-1' class='section-header'><a href='#example-1'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='ident'>CookieJar</span>::<span class='ident'>new</span>(<span class='string'>b"f8f9eaf1ecdedff5e5b749c58115441e"</span>);
|
||||
|
||||
<span class='comment'>// Add a signed cookie to the jar</span>
|
||||
<span class='ident'>c</span>.<span class='ident'>signed</span>().<span class='ident'>add</span>(<span class='ident'>Cookie</span>::<span class='ident'>new</span>(<span class='string'>"key"</span>.<span class='ident'>to_string</span>(), <span class='string'>"value"</span>.<span class='ident'>to_string</span>()));
|
||||
|
||||
<span class='comment'>// Add a permanently signed cookie to the jar</span>
|
||||
<span class='ident'>c</span>.<span class='ident'>permanent</span>().<span class='ident'>signed</span>()
|
||||
.<span class='ident'>add</span>(<span class='ident'>Cookie</span>::<span class='ident'>new</span>(<span class='string'>"key"</span>.<span class='ident'>to_string</span>(), <span class='string'>"value"</span>.<span class='ident'>to_string</span>()));</pre>
|
||||
</div><h4 id='method.encrypted' class='method'><code>fn <a href='#method.encrypted' class='fnname'>encrypted</a><'b>(&'b self) -> <a class='struct' href='../cookie/struct.CookieJar.html' title='cookie::CookieJar'>CookieJar</a><'b></code></h4>
|
||||
<div class='docblock'><p>Creates a child encrypted cookie jar.</p>
|
||||
|
||||
<p>All cookies read from the child jar must be encrypted and signed by a
|
||||
valid key and all cookies written will be encrypted and signed
|
||||
automatically.</p>
|
||||
|
||||
<h1 id='example-2' class='section-header'><a href='#example-2'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='ident'>CookieJar</span>::<span class='ident'>new</span>(<span class='string'>b"f8f9eaf1ecdedff5e5b749c58115441e"</span>);
|
||||
|
||||
<span class='comment'>// Add a signed and encrypted cookie to the jar</span>
|
||||
<span class='ident'>c</span>.<span class='ident'>encrypted</span>().<span class='ident'>add</span>(<span class='ident'>Cookie</span>::<span class='ident'>new</span>(<span class='string'>"key"</span>.<span class='ident'>to_string</span>(), <span class='string'>"value"</span>.<span class='ident'>to_string</span>()));
|
||||
|
||||
<span class='comment'>// Add a permanently signed and encrypted cookie to the jar</span>
|
||||
<span class='ident'>c</span>.<span class='ident'>permanent</span>().<span class='ident'>encrypted</span>()
|
||||
.<span class='ident'>add</span>(<span class='ident'>Cookie</span>::<span class='ident'>new</span>(<span class='string'>"key"</span>.<span class='ident'>to_string</span>(), <span class='string'>"value"</span>.<span class='ident'>to_string</span>()));</pre>
|
||||
</div><h4 id='method.permanent' class='method'><code>fn <a href='#method.permanent' class='fnname'>permanent</a><'b>(&'b self) -> <a class='struct' href='../cookie/struct.CookieJar.html' title='cookie::CookieJar'>CookieJar</a><'b></code></h4>
|
||||
<div class='docblock'><p>Creates a child jar for permanent cookie storage.</p>
|
||||
|
||||
<p>All cookies written to the child jar will have an expiration date 20
|
||||
years into the future to ensure they stick around for a long time.</p>
|
||||
</div><h4 id='method.delta' class='method'><code>fn <a href='#method.delta' class='fnname'>delta</a>(&self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='../cookie/struct.Cookie.html' title='cookie::Cookie'>Cookie</a>></code></h4>
|
||||
<div class='docblock'><p>Calculates the changes that have occurred to this cookie jar over time,
|
||||
returning a vector of <code>Set-Cookie</code> headers.</p>
|
||||
</div><h4 id='method.iter' class='method'><code>fn <a href='#method.iter' class='fnname'>iter</a>(&self) -> Iter</code></h4>
|
||||
<div class='docblock'><p>Return an iterator over the cookies in this jar.</p>
|
||||
|
||||
<p>This iterator will only yield valid cookies for this jar. For example if
|
||||
this is an encrypted child jar then only valid encrypted cookies will be
|
||||
yielded. If the root cookie jar is iterated over then all cookies will
|
||||
be yielded.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "cookie";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
132
error/index.html
Normal file
132
error/index.html
Normal file
|
@ -0,0 +1,132 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `error` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, error">
|
||||
|
||||
<title>error - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'error', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>error</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/error/lib.rs.html#1-155' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>A generic, extendable Error type.</p>
|
||||
</div><h2 id='macros' class='section-header'><a href="#macros">Macros</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='macro' href='macro.match_error!.html'
|
||||
title='error::match_error!'>match_error!</a></td>
|
||||
<td class='docblock short'>
|
||||
|
||||
</td>
|
||||
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.Error.html'
|
||||
title='error::Error'>Error</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An extension to std::error::Error which provides dynamic downcasting of
|
||||
errors for use in highly generic contexts.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "error";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
119
error/macro.match_error!.html
Normal file
119
error/macro.match_error!.html
Normal file
|
@ -0,0 +1,119 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `match_error!` macro in crate `error`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, match_error!">
|
||||
|
||||
<title>error::match_error! - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>error</a></p><script>window.sidebarCurrent = {name: 'match_error!', ty: 'macro', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content macro">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>error</a>::<wbr><a class='macro' href=''>match_error!</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-32' class='srclink' href='../src/error/lib.rs.html#99-115' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust macro'>
|
||||
<span class='macro'>macro_rules</span><span class='macro'>!</span> <span class='ident'>match_error</span> {
|
||||
(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>m</span>:<span class='ident'>expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>i1</span>:<span class='ident'>pat</span> <span class='op'>=></span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t1</span>:<span class='ident'>ty</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e1</span>:<span class='ident'>expr</span>) <span class='op'>=></span> { ... };
|
||||
(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>m</span>:<span class='ident'>expr</span>, <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>i1</span>:<span class='ident'>pat</span> <span class='op'>=></span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t1</span>:<span class='ident'>ty</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e1</span>:<span class='ident'>expr</span>, $(<span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>i</span>:<span class='ident'>pat</span> <span class='op'>=></span> <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>t</span>:<span class='ident'>ty</span>: <span class='macro-nonterminal'>$</span><span class='macro-nonterminal'>e</span>:<span class='ident'>expr</span>),<span class='op'>+</span>) <span class='op'>=></span> { ... };
|
||||
}</pre>
|
||||
</section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "error";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
error/sidebar-items.js
Normal file
1
error/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"macro":[["match_error!",""]],"trait":[["Error","An extension to std::error::Error which provides dynamic downcasting of errors for use in highly generic contexts."]]});
|
173
error/trait.Error.html
Normal file
173
error/trait.Error.html
Normal file
|
@ -0,0 +1,173 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Error` trait in crate `error`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Error">
|
||||
|
||||
<title>error::Error - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>error</a></p><script>window.sidebarCurrent = {name: 'Error', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>error</a>::<wbr><a class='trait' href=''>Error</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-11' class='srclink' href='../src/error/lib.rs.html#62' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait Error: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='../typeable/trait.Typeable.html' title='typeable::Typeable'>Typeable</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a> { }</pre><div class='docblock'><p>An extension to std::error::Error which provides dynamic downcasting of
|
||||
errors for use in highly generic contexts.</p>
|
||||
|
||||
<h2 id='when-to-use-this-trait' class='section-header'><a href='#when-to-use-this-trait'>When to use this trait</a></h2>
|
||||
<p>In the vast majority of cases, a library-specific <code>enum</code> should be used
|
||||
for cases where there can be many different types of errors. This has
|
||||
the benefit of being very performant and benefiting from all sorts
|
||||
of static checking at both the instantiation site and the handling
|
||||
site of the error.</p>
|
||||
|
||||
<p>In other cases, being generic over <code>std::error::Error</code> may be correct
|
||||
- usually for logging errors or in other places where an error is
|
||||
used as <em>input</em>.</p>
|
||||
|
||||
<p>Now, a motivating example for this trait, which doesn't fall under
|
||||
either of these cases:</p>
|
||||
|
||||
<p>Imagine we are creating a simple web middleware for verifying incoming
|
||||
HTTP requests. It will take in many different user-defined <code>Verifier</code>s
|
||||
and will call them one after the other, rejecting the request on any
|
||||
error.</p>
|
||||
|
||||
<p>The first step would be to write a <code>Verifier</code> trait:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>pub</span> <span class='kw'>trait</span> <span class='ident'>Verifier</span> {
|
||||
<span class='doccomment'>/// Verify the request, yielding an error if the request is invalid.</span>
|
||||
<span class='kw'>fn</span> <span class='ident'>verify</span>(<span class='kw-2'>&</span><span class='ident'>Request</span>) <span class='op'>-></span> <span class='prelude-ty'>Result</span><span class='op'><</span>(), ???<span class='op'>></span>;
|
||||
}</pre>
|
||||
|
||||
<p>A problem quickly arises - what type do we use for the <code>Err</code> case? We
|
||||
cannot use a concrete type since each <code>Verifier</code> may wish to throw
|
||||
any number of different errors, and we cannot use a generic since
|
||||
the type is chosen by the implementor, not the caller, and it cannot
|
||||
be a generic on the trait since we will want to store many <code>Verifier</code>s
|
||||
together.</p>
|
||||
|
||||
<p>Enter: <code>Box<error::Error></code>, a type which can be used to represent
|
||||
any <code>std::error::Error</code> with the sufficient bounds, and can <em>also</em>
|
||||
be handled later by downcasting it to the right error using either
|
||||
<code>.downcast</code> or the <code>match_error!</code> macro. This type can be used to meet
|
||||
the needs of consumers like <code>Verifier</code>, but should not be used in cases
|
||||
where enums or generics are better suited.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../error/trait.Error.html' title='error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-14' class='srclink' href='../src/error/lib.rs.html#66-78' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.is' class='method'><code>fn <a href='#method.is' class='fnname'>is</a><E: <a class='trait' href='../error/trait.Error.html' title='error::Error'>Error</a>>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Is this <code>Error</code> object of type <code>E</code>?</p>
|
||||
</div><h4 id='method.downcast' class='method'><code>fn <a href='#method.downcast' class='fnname'>downcast</a><E: <a class='trait' href='../error/trait.Error.html' title='error::Error'>Error</a>>(&self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&E></code></h4>
|
||||
<div class='docblock'><p>If this error is <code>E</code>, downcast this error to <code>E</code>, by reference.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../error/trait.Error.html' title='error::Error'>Error</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-21' class='srclink' href='../src/error/lib.rs.html#80-92' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.is-1' class='method'><code>fn <a href='#method.is-1' class='fnname'>is</a><E: <a class='trait' href='../error/trait.Error.html' title='error::Error'>Error</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Is this <code>Error + Send</code> object of type <code>E</code>?</p>
|
||||
</div><h4 id='method.downcast-1' class='method'><code>fn <a href='#method.downcast-1' class='fnname'>downcast</a><E: <a class='trait' href='../error/trait.Error.html' title='error::Error'>Error</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>>(&self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&E></code></h4>
|
||||
<div class='docblock'><p>If this error is <code>E</code>, downcast this error to <code>E</code>, by reference.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
<li><code>impl<S: <a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='../typeable/trait.Typeable.html' title='typeable::Typeable'>Typeable</a>> Error for S</code></li>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../implementors/error/trait.Error.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "error";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
139
hpack/decoder/enum.DecoderError.html
Normal file
139
hpack/decoder/enum.DecoderError.html
Normal file
|
@ -0,0 +1,139 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `DecoderError` enum in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, DecoderError">
|
||||
|
||||
<title>hpack::decoder::DecoderError - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a></p><script>window.sidebarCurrent = {name: 'DecoderError', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a>::<wbr><a class='enum' href=''>DecoderError</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-194' class='srclink' href='../../src/hpack/decoder.rs.html#210-218' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum DecoderError {
|
||||
HeaderIndexOutOfBounds,
|
||||
IntegerDecodingError(<a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a>),
|
||||
StringDecodingError(<a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a>),
|
||||
InvalidMaxDynamicSize,
|
||||
}</pre><div class='docblock'><p>Represents all errors that can be encountered while performing the decoding
|
||||
of an HPACK header set.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.HeaderIndexOutOfBounds' class='variant'><code>HeaderIndexOutOfBounds</code></span><span id='variant.IntegerDecodingError' class='variant'><code>IntegerDecodingError(<a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a>)</code></span><span id='variant.StringDecodingError' class='variant'><code>StringDecodingError(<a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a>)</code></span><span id='variant.InvalidMaxDynamicSize' class='variant'><code>InvalidMaxDynamicSize</code></span><div class='docblock'><p>The size of the dynamic table can never be allowed to exceed the max
|
||||
size mandated to the decoder by the protocol. (by perfroming changes
|
||||
made by SizeUpdate blocks).</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-159' class='srclink' href='../../src/hpack/decoder.rs.html#206' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-178' class='srclink' href='../../src/hpack/decoder.rs.html#207' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-179' class='srclink' href='../../src/hpack/decoder.rs.html#208' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-184' class='srclink' href='../../src/hpack/decoder.rs.html#209' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
145
hpack/decoder/enum.IntegerDecodingError.html
Normal file
145
hpack/decoder/enum.IntegerDecodingError.html
Normal file
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `IntegerDecodingError` enum in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, IntegerDecodingError">
|
||||
|
||||
<title>hpack::decoder::IntegerDecodingError - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a></p><script>window.sidebarCurrent = {name: 'IntegerDecodingError', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a>::<wbr><a class='enum' href=''>IntegerDecodingError</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-123' class='srclink' href='../../src/hpack/decoder.rs.html#177-191' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum IntegerDecodingError {
|
||||
TooManyOctets,
|
||||
ValueTooLarge,
|
||||
NotEnoughOctets,
|
||||
InvalidPrefix,
|
||||
}</pre><div class='docblock'><p>Represents all errors that can be encountered while decoding an
|
||||
integer.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.TooManyOctets' class='variant'><code>TooManyOctets</code></span><div class='docblock'><p>5.1. specifies that "excessively large integer decodings" MUST be
|
||||
considered an error (whether the size is the number of octets or
|
||||
value). This variant corresponds to the encoding containing too many
|
||||
octets.</p>
|
||||
</div><span id='variant.ValueTooLarge' class='variant'><code>ValueTooLarge</code></span><div class='docblock'><p>The variant corresponds to the case where the value of the integer
|
||||
being decoded exceeds a certain threshold.</p>
|
||||
</div><span id='variant.NotEnoughOctets' class='variant'><code>NotEnoughOctets</code></span><div class='docblock'><p>When a buffer from which an integer was supposed to be encoded does
|
||||
not contain enough octets to complete the decoding.</p>
|
||||
</div><span id='variant.InvalidPrefix' class='variant'><code>InvalidPrefix</code></span><div class='docblock'><p>Only valid prefixes are [1, 8]</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-105' class='srclink' href='../../src/hpack/decoder.rs.html#173' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-111' class='srclink' href='../../src/hpack/decoder.rs.html#174' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-112' class='srclink' href='../../src/hpack/decoder.rs.html#175' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../../hpack/decoder/enum.IntegerDecodingError.html' title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-115' class='srclink' href='../../src/hpack/decoder.rs.html#176' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
134
hpack/decoder/enum.StringDecodingError.html
Normal file
134
hpack/decoder/enum.StringDecodingError.html
Normal file
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `StringDecodingError` enum in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, StringDecodingError">
|
||||
|
||||
<title>hpack::decoder::StringDecodingError - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a></p><script>window.sidebarCurrent = {name: 'StringDecodingError', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a>::<wbr><a class='enum' href=''>StringDecodingError</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-155' class='srclink' href='../../src/hpack/decoder.rs.html#199-202' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum StringDecodingError {
|
||||
NotEnoughOctets,
|
||||
HuffmanDecoderError(<a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a>),
|
||||
}</pre><div class='docblock'><p>Represents all errors that can be encountered while decoding an octet
|
||||
string.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.NotEnoughOctets' class='variant'><code>NotEnoughOctets</code></span><span id='variant.HuffmanDecoderError' class='variant'><code>HuffmanDecoderError(<a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a>)</code></span><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-128' class='srclink' href='../../src/hpack/decoder.rs.html#195' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-143' class='srclink' href='../../src/hpack/decoder.rs.html#196' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-144' class='srclink' href='../../src/hpack/decoder.rs.html#197' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../../hpack/decoder/enum.StringDecodingError.html' title='hpack::decoder::StringDecodingError'>StringDecodingError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-148' class='srclink' href='../../src/hpack/decoder.rs.html#198' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
175
hpack/decoder/index.html
Normal file
175
hpack/decoder/index.html
Normal file
|
@ -0,0 +1,175 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `decoder` mod in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, decoder">
|
||||
|
||||
<title>hpack::decoder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a></p><script>window.sidebarCurrent = {name: 'decoder', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>hpack</a>::<wbr><a class='mod' href=''>decoder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-59' class='srclink' href='../../src/hpack/decoder.rs.html#1-1484' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Exposes the struct <code>Decoder</code> that allows for HPACK-encoded header blocks to
|
||||
be decoded into a header list.</p>
|
||||
|
||||
<p>The decoder only follows HPACK rules, without performing any additional
|
||||
(semantic) checks on the header name/value pairs, i.e. it considers the
|
||||
headers as opaque octets.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<p>A simple example of using the decoder that demonstrates its API:</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>hpack</span>::<span class='ident'>Decoder</span>;
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>decoder</span> <span class='op'>=</span> <span class='ident'>Decoder</span>::<span class='ident'>new</span>();
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>header_list</span> <span class='op'>=</span> <span class='ident'>decoder</span>.<span class='ident'>decode</span>(<span class='kw-2'>&</span>[<span class='number'>0x82</span>, <span class='number'>0x84</span>]).<span class='ident'>unwrap</span>();
|
||||
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>header_list</span>, [
|
||||
(<span class='string'>b":method"</span>.<span class='ident'>to_vec</span>(), <span class='string'>b"GET"</span>.<span class='ident'>to_vec</span>()),
|
||||
(<span class='string'>b":path"</span>.<span class='ident'>to_vec</span>(), <span class='string'>b"/"</span>.<span class='ident'>to_vec</span>()),
|
||||
]);</pre>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Decoder.html'
|
||||
title='hpack::decoder::Decoder'>Decoder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Decodes headers encoded using HPACK.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.DecoderError.html'
|
||||
title='hpack::decoder::DecoderError'>DecoderError</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Represents all errors that can be encountered while performing the decoding
|
||||
of an HPACK header set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.IntegerDecodingError.html'
|
||||
title='hpack::decoder::IntegerDecodingError'>IntegerDecodingError</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Represents all errors that can be encountered while decoding an
|
||||
integer.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.StringDecodingError.html'
|
||||
title='hpack::decoder::StringDecodingError'>StringDecodingError</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Represents all errors that can be encountered while decoding an octet
|
||||
string.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.DecoderResult.html'
|
||||
title='hpack::decoder::DecoderResult'>DecoderResult</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The result returned by the <code>decode</code> method of the <code>Decoder</code>.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hpack/decoder/sidebar-items.js
Normal file
1
hpack/decoder/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"enum":[["DecoderError","Represents all errors that can be encountered while performing the decoding of an HPACK header set."],["IntegerDecodingError","Represents all errors that can be encountered while decoding an integer."],["StringDecodingError","Represents all errors that can be encountered while decoding an octet string."]],"struct":[["Decoder","Decodes headers encoded using HPACK."]],"type":[["DecoderResult","The result returned by the `decode` method of the `Decoder`."]]});
|
134
hpack/decoder/struct.Decoder.html
Normal file
134
hpack/decoder/struct.Decoder.html
Normal file
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Decoder` struct in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Decoder">
|
||||
|
||||
<title>hpack::decoder::Decoder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a></p><script>window.sidebarCurrent = {name: 'Decoder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a>::<wbr><a class='struct' href=''>Decoder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-202' class='srclink' href='../../src/hpack/decoder.rs.html#228-231' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Decoder<'a> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>Decodes headers encoded using HPACK.</p>
|
||||
|
||||
<p>For now, incremental decoding is not supported, i.e. it is necessary
|
||||
to pass in the entire encoded representation of all headers to the
|
||||
decoder, rather than processing it piece-by-piece.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='struct' href='../../hpack/decoder/struct.Decoder.html' title='hpack::decoder::Decoder'>Decoder</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-205' class='srclink' href='../../src/hpack/decoder.rs.html#235-403' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='docblock'><p>Represents a decoder of HPACK encoded headers. Maintains the state
|
||||
necessary to correctly decode subsequent HPACK blocks.</p>
|
||||
</div><div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='struct' href='../../hpack/decoder/struct.Decoder.html' title='hpack::decoder::Decoder'>Decoder</a><'a></code></h4>
|
||||
<div class='docblock'><p>Creates a new <code>Decoder</code> with all settings set to default values.</p>
|
||||
</div><h4 id='method.set_max_table_size' class='method'><code>fn <a href='#method.set_max_table_size' class='fnname'>set_max_table_size</a>(&mut self, new_max_size: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></h4>
|
||||
<div class='docblock'><p>Sets a new maximum dynamic table size for the decoder.</p>
|
||||
</div><h4 id='method.decode' class='method'><code>fn <a href='#method.decode' class='fnname'>decode</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='../../hpack/decoder/type.DecoderResult.html' title='hpack::decoder::DecoderResult'>DecoderResult</a></code></h4>
|
||||
<div class='docblock'><p>Decode the header block found in the given buffer.</p>
|
||||
|
||||
<p>The buffer should represent the entire block that should be decoded.
|
||||
For example, in HTTP/2, all continuation frames need to be concatenated
|
||||
to a single buffer before passing them to the decoder.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
115
hpack/decoder/type.DecoderResult.html
Normal file
115
hpack/decoder/type.DecoderResult.html
Normal file
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `DecoderResult` type in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, DecoderResult">
|
||||
|
||||
<title>hpack::decoder::DecoderResult - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a></p><script>window.sidebarCurrent = {name: 'DecoderResult', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>decoder</a>::<wbr><a class='type' href=''>DecoderResult</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-201' class='srclink' href='../../src/hpack/decoder.rs.html#221' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type DecoderResult = <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>, <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>>, <a class='enum' href='../../hpack/decoder/enum.DecoderError.html' title='hpack::decoder::DecoderError'>DecoderError</a>>;</pre><div class='docblock'><p>The result returned by the <code>decode</code> method of the <code>Decoder</code>.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
119
hpack/encoder/fn.encode_integer.html
Normal file
119
hpack/encoder/fn.encode_integer.html
Normal file
|
@ -0,0 +1,119 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `encode_integer` fn in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, encode_integer">
|
||||
|
||||
<title>hpack::encoder::encode_integer - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>encoder</a></p><script>window.sidebarCurrent = {name: 'encode_integer', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content fn">
|
||||
<h1 class='fqn'><span class='in-band'>Function <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>encoder</a>::<wbr><a class='fn' href=''>encode_integer</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-16' class='srclink' href='../../src/hpack/encoder.rs.html#58-82' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust fn'>pub fn encode_integer(value: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, prefix_size: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></pre><div class='docblock'><p>Encode an integer to the representation defined by HPACK.</p>
|
||||
|
||||
<p>Returns a newly allocated <code>Vec</code> containing the encoded bytes.
|
||||
Only <code>prefix_size</code> lowest-order bits of the first byte in the
|
||||
array are guaranteed to be used.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
175
hpack/encoder/index.html
Normal file
175
hpack/encoder/index.html
Normal file
|
@ -0,0 +1,175 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `encoder` mod in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, encoder">
|
||||
|
||||
<title>hpack::encoder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a></p><script>window.sidebarCurrent = {name: 'encoder', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>hpack</a>::<wbr><a class='mod' href=''>encoder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-12' class='srclink' href='../../src/hpack/encoder.rs.html#1-391' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Implements all functionality related to encoding header blocks using
|
||||
HPACK.</p>
|
||||
|
||||
<p>Clients should use the <code>Encoder</code> struct as the API for performing HPACK
|
||||
encoding.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>Encodes a header using a literal encoding.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>hpack</span>::<span class='ident'>Encoder</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>encoder</span> <span class='op'>=</span> <span class='ident'>Encoder</span>::<span class='ident'>new</span>();
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>headers</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
(<span class='string'>b"custom-key"</span>.<span class='ident'>to_vec</span>(), <span class='string'>b"custom-value"</span>.<span class='ident'>to_vec</span>()),
|
||||
];
|
||||
<span class='comment'>// First encoding...</span>
|
||||
<span class='kw'>let</span> <span class='ident'>result</span> <span class='op'>=</span> <span class='ident'>encoder</span>.<span class='ident'>encode</span>(<span class='kw-2'>&</span><span class='ident'>headers</span>);
|
||||
<span class='comment'>// The result is a literal encoding of the header name and value, with an</span>
|
||||
<span class='comment'>// initial byte representing the type of the encoding</span>
|
||||
<span class='comment'>// (incremental indexing).</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(
|
||||
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0x40</span>,
|
||||
<span class='number'>10</span>, <span class='string'>b'c'</span>, <span class='string'>b'u'</span>, <span class='string'>b's'</span>, <span class='string'>b't'</span>, <span class='string'>b'o'</span>, <span class='string'>b'm'</span>, <span class='string'>b'-'</span>, <span class='string'>b'k'</span>, <span class='string'>b'e'</span>, <span class='string'>b'y'</span>,
|
||||
<span class='number'>12</span>, <span class='string'>b'c'</span>, <span class='string'>b'u'</span>, <span class='string'>b's'</span>, <span class='string'>b't'</span>, <span class='string'>b'o'</span>, <span class='string'>b'm'</span>, <span class='string'>b'-'</span>, <span class='string'>b'v'</span>, <span class='string'>b'a'</span>, <span class='string'>b'l'</span>,
|
||||
<span class='string'>b'u'</span>, <span class='string'>b'e'</span>],
|
||||
<span class='ident'>result</span>);</pre>
|
||||
|
||||
<p>Encodes some pseudo-headers that are already found in the static table.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>hpack</span>::<span class='ident'>Encoder</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>encoder</span> <span class='op'>=</span> <span class='ident'>Encoder</span>::<span class='ident'>new</span>();
|
||||
<span class='kw'>let</span> <span class='ident'>headers</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
(<span class='string'>b":method"</span>.<span class='ident'>to_vec</span>(), <span class='string'>b"GET"</span>.<span class='ident'>to_vec</span>()),
|
||||
(<span class='string'>b":path"</span>.<span class='ident'>to_vec</span>(), <span class='string'>b"/"</span>.<span class='ident'>to_vec</span>()),
|
||||
];
|
||||
|
||||
<span class='comment'>// The headers are encoded by providing their index (with a bit flag</span>
|
||||
<span class='comment'>// indicating that the indexed representation is used).</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>encoder</span>.<span class='ident'>encode</span>(<span class='kw-2'>&</span><span class='ident'>headers</span>), <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>2</span> <span class='op'>|</span> <span class='number'>0x80</span>, <span class='number'>4</span> <span class='op'>|</span> <span class='number'>0x80</span>]);</pre>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Encoder.html'
|
||||
title='hpack::encoder::Encoder'>Encoder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Represents an HPACK encoder. Allows clients to encode arbitrary header sets
|
||||
and tracks the encoding context. That is, encoding subsequent header sets
|
||||
will use the context built by previous encode calls.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='fn' href='fn.encode_integer.html'
|
||||
title='hpack::encoder::encode_integer'>encode_integer</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Encode an integer to the representation defined by HPACK.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hpack/encoder/sidebar-items.js
Normal file
1
hpack/encoder/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"fn":[["encode_integer","Encode an integer to the representation defined by HPACK."]],"struct":[["Encoder","Represents an HPACK encoder. Allows clients to encode arbitrary header sets and tracks the encoding context. That is, encoding subsequent header sets will use the context built by previous encode calls."]]});
|
167
hpack/encoder/struct.Encoder.html
Normal file
167
hpack/encoder/struct.Encoder.html
Normal file
|
@ -0,0 +1,167 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Encoder` struct in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Encoder">
|
||||
|
||||
<title>hpack::encoder::Encoder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>encoder</a></p><script>window.sidebarCurrent = {name: 'Encoder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>encoder</a>::<wbr><a class='struct' href=''>Encoder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-22' class='srclink' href='../../src/hpack/encoder.rs.html#121-124' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Encoder<'a> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>Represents an HPACK encoder. Allows clients to encode arbitrary header sets
|
||||
and tracks the encoding context. That is, encoding subsequent header sets
|
||||
will use the context built by previous encode calls.</p>
|
||||
|
||||
<p>This is the main API for performing HPACK encoding of headers.</p>
|
||||
|
||||
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
|
||||
<p>Encoding a header two times in a row produces two different
|
||||
representations, due to the utilization of HPACK compression.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>hpack</span>::<span class='ident'>Encoder</span>;
|
||||
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>encoder</span> <span class='op'>=</span> <span class='ident'>Encoder</span>::<span class='ident'>new</span>();
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>headers</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[
|
||||
(<span class='string'>b"custom-key"</span>.<span class='ident'>to_vec</span>(), <span class='string'>b"custom-value"</span>.<span class='ident'>to_vec</span>()),
|
||||
];
|
||||
<span class='comment'>// First encoding...</span>
|
||||
<span class='kw'>let</span> <span class='ident'>result</span> <span class='op'>=</span> <span class='ident'>encoder</span>.<span class='ident'>encode</span>(<span class='kw-2'>&</span><span class='ident'>headers</span>);
|
||||
<span class='comment'>// The result is a literal encoding of the header name and value, with an</span>
|
||||
<span class='comment'>// initial byte representing the type of the encoding</span>
|
||||
<span class='comment'>// (incremental indexing).</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(
|
||||
<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0x40</span>,
|
||||
<span class='number'>10</span>, <span class='string'>b'c'</span>, <span class='string'>b'u'</span>, <span class='string'>b's'</span>, <span class='string'>b't'</span>, <span class='string'>b'o'</span>, <span class='string'>b'm'</span>, <span class='string'>b'-'</span>, <span class='string'>b'k'</span>, <span class='string'>b'e'</span>, <span class='string'>b'y'</span>,
|
||||
<span class='number'>12</span>, <span class='string'>b'c'</span>, <span class='string'>b'u'</span>, <span class='string'>b's'</span>, <span class='string'>b't'</span>, <span class='string'>b'o'</span>, <span class='string'>b'm'</span>, <span class='string'>b'-'</span>, <span class='string'>b'v'</span>, <span class='string'>b'a'</span>, <span class='string'>b'l'</span>,
|
||||
<span class='string'>b'u'</span>, <span class='string'>b'e'</span>],
|
||||
<span class='ident'>result</span>);
|
||||
|
||||
<span class='comment'>// Encode the same headers again!</span>
|
||||
<span class='kw'>let</span> <span class='ident'>result</span> <span class='op'>=</span> <span class='ident'>encoder</span>.<span class='ident'>encode</span>(<span class='kw-2'>&</span><span class='ident'>headers</span>);
|
||||
<span class='comment'>// The result is simply the index of the header in the header table (62),</span>
|
||||
<span class='comment'>// with a flag representing that the decoder should use the index.</span>
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0x80</span> <span class='op'>|</span> <span class='number'>62</span>], <span class='ident'>result</span>);</pre>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='struct' href='../../hpack/encoder/struct.Encoder.html' title='hpack::encoder::Encoder'>Encoder</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-25' class='srclink' href='../../src/hpack/encoder.rs.html#126-239' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='struct' href='../../hpack/encoder/struct.Encoder.html' title='hpack::encoder::Encoder'>Encoder</a><'a></code></h4>
|
||||
<div class='docblock'><p>Creates a new <code>Encoder</code> with a default static table, as defined by the
|
||||
HPACK spec (Appendix A).</p>
|
||||
</div><h4 id='method.encode' class='method'><code>fn <a href='#method.encode' class='fnname'>encode</a>(&mut self, headers: &<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>, <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code></h4>
|
||||
<div class='docblock'><p>Encodes the given headers using the HPACK rules and returns a newly
|
||||
allocated <code>Vec</code> containing the bytes representing the encoded header
|
||||
set.</p>
|
||||
|
||||
<p>The encoder so far supports only a single, extremely simple encoding
|
||||
strategy, whereby each header is represented as an indexed header if
|
||||
already found in the header table and a literal otherwise. When a
|
||||
header isn't found in the table, it is added if the header name wasn't
|
||||
found either (i.e. there are never two header names with different
|
||||
values in the produced header table). Strings are always encoded as
|
||||
literals (Huffman encoding is not used).</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
138
hpack/huffman/enum.HuffmanDecoderError.html
Normal file
138
hpack/huffman/enum.HuffmanDecoderError.html
Normal file
|
@ -0,0 +1,138 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `HuffmanDecoderError` enum in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, HuffmanDecoderError">
|
||||
|
||||
<title>hpack::huffman::HuffmanDecoderError - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>huffman</a></p><script>window.sidebarCurrent = {name: 'HuffmanDecoderError', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>huffman</a>::<wbr><a class='enum' href=''>HuffmanDecoderError</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-317' class='srclink' href='../../src/hpack/huffman.rs.html#33-41' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum HuffmanDecoderError {
|
||||
PaddingTooLarge,
|
||||
InvalidPadding,
|
||||
EOSInString,
|
||||
}</pre><div class='docblock'><p>Represents the error variants that the <code>HuffmanDecoder</code> can return.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.PaddingTooLarge' class='variant'><code>PaddingTooLarge</code></span><div class='docblock'><p>Any padding strictly larger than 7 bits MUST be interpreted as an error</p>
|
||||
</div><span id='variant.InvalidPadding' class='variant'><code>InvalidPadding</code></span><div class='docblock'><p>Any padding that does not correspond to the most significant bits of
|
||||
EOS MUST be interpreted as an error.</p>
|
||||
</div><span id='variant.EOSInString' class='variant'><code>EOSInString</code></span><div class='docblock'><p>If EOS is ever found in the string, it causes an error.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-300' class='srclink' href='../../src/hpack/huffman.rs.html#29' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-306' class='srclink' href='../../src/hpack/huffman.rs.html#30' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-307' class='srclink' href='../../src/hpack/huffman.rs.html#31' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-310' class='srclink' href='../../src/hpack/huffman.rs.html#32' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
142
hpack/huffman/index.html
Normal file
142
hpack/huffman/index.html
Normal file
|
@ -0,0 +1,142 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `huffman` mod in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, huffman">
|
||||
|
||||
<title>hpack::huffman - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a></p><script>window.sidebarCurrent = {name: 'huffman', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>hpack</a>::<wbr><a class='mod' href=''>huffman</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-291' class='srclink' href='../../src/hpack/huffman.rs.html#1-702' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>A module exposing utilities for encoding and decoding Huffman-coded octet
|
||||
strings, under the Huffman code defined by HPACK.
|
||||
(HPACK-draft-10, Appendix B)</p>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.HuffmanDecoder.html'
|
||||
title='hpack::huffman::HuffmanDecoder'>HuffmanDecoder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A simple implementation of a Huffman code decoder.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.HuffmanDecoderError.html'
|
||||
title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Represents the error variants that the <code>HuffmanDecoder</code> can return.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.HuffmanDecoderResult.html'
|
||||
title='hpack::huffman::HuffmanDecoderResult'>HuffmanDecoderResult</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The type that represents the result of the <code>decode</code> method of the
|
||||
<code>HuffmanDecoder</code>.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hpack/huffman/sidebar-items.js
Normal file
1
hpack/huffman/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"enum":[["HuffmanDecoderError","Represents the error variants that the `HuffmanDecoder` can return."]],"struct":[["HuffmanDecoder","A simple implementation of a Huffman code decoder."]],"type":[["HuffmanDecoderResult","The type that represents the result of the `decode` method of the `HuffmanDecoder`."]]});
|
127
hpack/huffman/struct.HuffmanDecoder.html
Normal file
127
hpack/huffman/struct.HuffmanDecoder.html
Normal file
|
@ -0,0 +1,127 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `HuffmanDecoder` struct in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, HuffmanDecoder">
|
||||
|
||||
<title>hpack::huffman::HuffmanDecoder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>huffman</a></p><script>window.sidebarCurrent = {name: 'HuffmanDecoder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>hpack</a>::<wbr><a href='index.html'>huffman</a>::<wbr><a class='struct' href=''>HuffmanDecoder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-322' class='srclink' href='../../src/hpack/huffman.rs.html#48-53' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct HuffmanDecoder {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A simple implementation of a Huffman code decoder.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../hpack/huffman/struct.HuffmanDecoder.html' title='hpack::huffman::HuffmanDecoder'>HuffmanDecoder</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-325' class='srclink' href='../../src/hpack/huffman.rs.html#55-168' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='struct' href='../../hpack/huffman/struct.HuffmanDecoder.html' title='hpack::huffman::HuffmanDecoder'>HuffmanDecoder</a></code></h4>
|
||||
<div class='docblock'><p>Constructs a new HuffmanDecoder with the default Huffman code table, as
|
||||
defined in the HPACK-draft-10, Appendix B.</p>
|
||||
</div><h4 id='method.decode' class='method'><code>fn <a href='#method.decode' class='fnname'>decode</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='../../hpack/huffman/type.HuffmanDecoderResult.html' title='hpack::huffman::HuffmanDecoderResult'>HuffmanDecoderResult</a></code></h4>
|
||||
<div class='docblock'><p>Decodes the buffer <code>buf</code> into a newly allocated <code>Vec</code>.</p>
|
||||
|
||||
<p>It assumes that the entire buffer should be considered as the Huffman
|
||||
encoding of an octet string and handles the padding rules
|
||||
accordingly.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
116
hpack/huffman/type.HuffmanDecoderResult.html
Normal file
116
hpack/huffman/type.HuffmanDecoderResult.html
Normal file
|
@ -0,0 +1,116 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `HuffmanDecoderResult` type in crate `hpack`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, HuffmanDecoderResult">
|
||||
|
||||
<title>hpack::huffman::HuffmanDecoderResult - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>huffman</a></p><script>window.sidebarCurrent = {name: 'HuffmanDecoderResult', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='../index.html'>hpack</a>::<wbr><a href='index.html'>huffman</a>::<wbr><a class='type' href=''>HuffmanDecoderResult</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-321' class='srclink' href='../../src/hpack/huffman.rs.html#45' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type HuffmanDecoderResult = <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>, <a class='enum' href='../../hpack/huffman/enum.HuffmanDecoderError.html' title='hpack::huffman::HuffmanDecoderError'>HuffmanDecoderError</a>>;</pre><div class='docblock'><p>The type that represents the result of the <code>decode</code> method of the
|
||||
<code>HuffmanDecoder</code>.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
146
hpack/index.html
Normal file
146
hpack/index.html
Normal file
|
@ -0,0 +1,146 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `hpack` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, hpack">
|
||||
|
||||
<title>hpack - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'hpack', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>hpack</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/hpack/lib.rs.html#1-761' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>A module implementing HPACK functionality. Exposes a simple API for
|
||||
performing the encoding and decoding of header sets, according to the
|
||||
HPACK spec.</p>
|
||||
</div><h2 id='reexports' class='section-header'><a href="#reexports">Reexports</a></h2>
|
||||
<table><tr><td><code>pub use self::<a class='mod'
|
||||
href='./decoder/index.html'>decoder</a>::<a class='struct' href='../hpack/decoder/struct.Decoder.html' title='hpack::decoder::Decoder'>Decoder</a>;</code></td></tr><tr><td><code>pub use self::<a class='mod'
|
||||
href='./encoder/index.html'>encoder</a>::<a class='struct' href='../hpack/encoder/struct.Encoder.html' title='hpack::encoder::Encoder'>Encoder</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='mod' href='decoder/index.html'
|
||||
title='hpack::decoder'>decoder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Exposes the struct <code>Decoder</code> that allows for HPACK-encoded header blocks to
|
||||
be decoded into a header list.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='mod' href='encoder/index.html'
|
||||
title='hpack::encoder'>encoder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Implements all functionality related to encoding header blocks using
|
||||
HPACK.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='mod' href='huffman/index.html'
|
||||
title='hpack::huffman'>huffman</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A module exposing utilities for encoding and decoding Huffman-coded octet
|
||||
strings, under the Huffman code defined by HPACK.
|
||||
(HPACK-draft-10, Appendix B)</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "hpack";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hpack/sidebar-items.js
Normal file
1
hpack/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"mod":[["decoder","Exposes the struct `Decoder` that allows for HPACK-encoded header blocks to be decoded into a header list."],["encoder","Implements all functionality related to encoding header blocks using HPACK."],["huffman","A module exposing utilities for encoding and decoding Huffman-coded octet strings, under the Huffman code defined by HPACK. (HPACK-draft-10, Appendix B)"]]});
|
120
httparse/constant.EMPTY_HEADER.html
Normal file
120
httparse/constant.EMPTY_HEADER.html
Normal file
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `EMPTY_HEADER` constant in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, EMPTY_HEADER">
|
||||
|
||||
<title>httparse::EMPTY_HEADER - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'EMPTY_HEADER', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content constant">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>httparse</a>::<wbr><a class='constant' href=''>EMPTY_HEADER</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-311' class='srclink' href='../src/httparse/lib.rs.html#318' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust const'>pub const EMPTY_HEADER: <a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'static><code> = </code><code>Header{name: "", value: b"",}</code></pre><div class='docblock'><p>An empty header, useful for constructing a <code>Header</code> array to pass in for
|
||||
parsing.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>headers</span> <span class='op'>=</span> [<span class='ident'>httparse</span>::<span class='ident'>EMPTY_HEADER</span>; <span class='number'>64</span>];</pre>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
146
httparse/enum.Error.html
Normal file
146
httparse/enum.Error.html
Normal file
|
@ -0,0 +1,146 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Error` enum in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Error">
|
||||
|
||||
<title>httparse::Error - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'Error', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>httparse</a>::<wbr><a class='enum' href=''>Error</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-119' class='srclink' href='../src/httparse/lib.rs.html#94-109' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum Error {
|
||||
HeaderName,
|
||||
HeaderValue,
|
||||
NewLine,
|
||||
Status,
|
||||
Token,
|
||||
TooManyHeaders,
|
||||
Version,
|
||||
}</pre><div class='docblock'><p>An error in parsing.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.HeaderName' class='variant'><code>HeaderName</code></span><div class='docblock'><p>Invalid byte in header name.</p>
|
||||
</div><span id='variant.HeaderValue' class='variant'><code>HeaderValue</code></span><div class='docblock'><p>INvalid byte in header value.</p>
|
||||
</div><span id='variant.NewLine' class='variant'><code>NewLine</code></span><div class='docblock'><p>Invalid byte in new line.</p>
|
||||
</div><span id='variant.Status' class='variant'><code>Status</code></span><div class='docblock'><p>Invalid byte in Response status.</p>
|
||||
</div><span id='variant.Token' class='variant'><code>Token</code></span><div class='docblock'><p>Invalid byte where token is required.</p>
|
||||
</div><span id='variant.TooManyHeaders' class='variant'><code>TooManyHeaders</code></span><div class='docblock'><p>Parsed more headers than provided buffer can contain.</p>
|
||||
</div><span id='variant.Version' class='variant'><code>Version</code></span><div class='docblock'><p>Invalid byte in HTTP version.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-95' class='srclink' href='../src/httparse/lib.rs.html#93' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-106' class='srclink' href='../src/httparse/lib.rs.html#93' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-109' class='srclink' href='../src/httparse/lib.rs.html#93' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-115' class='srclink' href='../src/httparse/lib.rs.html#93' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-118' class='srclink' href='../src/httparse/lib.rs.html#93' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
147
httparse/enum.Status.html
Normal file
147
httparse/enum.Status.html
Normal file
|
@ -0,0 +1,147 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Status` enum in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Status">
|
||||
|
||||
<title>httparse::Status - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'Status', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>httparse</a>::<wbr><a class='enum' href=''>Status</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-174' class='srclink' href='../src/httparse/lib.rs.html#129-134' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum Status<T> {
|
||||
Complete(T),
|
||||
Partial,
|
||||
}</pre><div class='docblock'><p>The result of a successful parse pass.</p>
|
||||
|
||||
<p><code>Complete</code> is used when the buffer contained the complete value.
|
||||
<code>Partial</code> is used when parsing did not reach the end of the expected value,
|
||||
but no invalid data was found.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.Complete' class='variant'><code>Complete(T)</code></span><div class='docblock'><p>The completed result.</p>
|
||||
</div><span id='variant.Partial' class='variant'><code>Partial</code></span><div class='docblock'><p>A partial result.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<T> <a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-179' class='srclink' href='../src/httparse/lib.rs.html#136-164' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.is_complete' class='method'><code>fn <a href='#method.is_complete' class='fnname'>is_complete</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Convenience method to check if status is complete.</p>
|
||||
</div><h4 id='method.is_partial' class='method'><code>fn <a href='#method.is_partial' class='fnname'>is_partial</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>Convenience method to check if status is partial.</p>
|
||||
</div><h4 id='method.unwrap' class='method'><code>fn <a href='#method.unwrap' class='fnname'>unwrap</a>(self) -> T</code></h4>
|
||||
<div class='docblock'><p>Convenience method to unwrap a Complete value. Panics if the status is
|
||||
<code>Partial</code>.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-143' class='srclink' href='../src/httparse/lib.rs.html#128' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-151' class='srclink' href='../src/httparse/lib.rs.html#128' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-167' class='srclink' href='../src/httparse/lib.rs.html#128' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<T: <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-172' class='srclink' href='../src/httparse/lib.rs.html#128' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
124
httparse/fn.parse_chunk_size.html
Normal file
124
httparse/fn.parse_chunk_size.html
Normal file
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `parse_chunk_size` fn in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, parse_chunk_size">
|
||||
|
||||
<title>httparse::parse_chunk_size - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'parse_chunk_size', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content fn">
|
||||
<h1 class='fqn'><span class='in-band'>Function <a href='index.html'>httparse</a>::<wbr><a class='fn' href=''>parse_chunk_size</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-407' class='srclink' href='../src/httparse/lib.rs.html#560-610' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust fn'>pub fn parse_chunk_size(buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>>, <a class='struct' href='../httparse/struct.InvalidChunkSize.html' title='httparse::InvalidChunkSize'>InvalidChunkSize</a>></pre><div class='docblock'><p>Parse a buffer of bytes as a chunk size.</p>
|
||||
|
||||
<p>The return value, if complete and successful, includes the index of the
|
||||
buffer that parsing stopped at, and the size of the following chunk.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>buf</span> <span class='op'>=</span> <span class='string'>b"4\r\nRust\r\n0\r\n\r\n"</span>;
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>httparse</span>::<span class='ident'>parse_chunk_size</span>(<span class='ident'>buf</span>),
|
||||
<span class='prelude-val'>Ok</span>(<span class='ident'>httparse</span>::<span class='ident'>Status</span>::<span class='ident'>Complete</span>((<span class='number'>3</span>, <span class='number'>4</span>))));</pre>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
130
httparse/fn.parse_headers.html
Normal file
130
httparse/fn.parse_headers.html
Normal file
|
@ -0,0 +1,130 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `parse_headers` fn in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, parse_headers">
|
||||
|
||||
<title>httparse::parse_headers - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'parse_headers', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content fn">
|
||||
<h1 class='fqn'><span class='in-band'>Function <a href='index.html'>httparse</a>::<wbr><a class='fn' href=''>parse_headers</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-367' class='srclink' href='../src/httparse/lib.rs.html#420-425' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust fn'>pub fn parse_headers<'b: 'h, 'h>(src: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'b [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, dst: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'h mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'b><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='../httparse/type.Result.html' title='httparse::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'h [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'b><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>)</a>></pre><div class='docblock'><p>Parse a buffer of bytes as headers.</p>
|
||||
|
||||
<p>The return value, if complete and successful, includes the index of the
|
||||
buffer that parsing stopped at, and a sliced reference to the parsed
|
||||
headers. The length of the slice will be equal to the number of properly
|
||||
parsed headers.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>buf</span> <span class='op'>=</span> <span class='string'>b"Host: foo.bar\nAccept: */*\n\nblah blah"</span>;
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>headers</span> <span class='op'>=</span> [<span class='ident'>httparse</span>::<span class='ident'>EMPTY_HEADER</span>; <span class='number'>4</span>];
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>httparse</span>::<span class='ident'>parse_headers</span>(<span class='ident'>buf</span>, <span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>headers</span>),
|
||||
<span class='prelude-val'>Ok</span>(<span class='ident'>httparse</span>::<span class='ident'>Status</span>::<span class='ident'>Complete</span>((<span class='number'>27</span>, <span class='kw-2'>&</span>[
|
||||
<span class='ident'>httparse</span>::<span class='ident'>Header</span> { <span class='ident'>name</span>: <span class='string'>"Host"</span>, <span class='ident'>value</span>: <span class='string'>b"foo.bar"</span> },
|
||||
<span class='ident'>httparse</span>::<span class='ident'>Header</span> { <span class='ident'>name</span>: <span class='string'>"Accept"</span>, <span class='ident'>value</span>: <span class='string'>b"*/*"</span> }
|
||||
][..]))));</pre>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
202
httparse/index.html
Normal file
202
httparse/index.html
Normal file
|
@ -0,0 +1,202 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `httparse` crate.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, httparse">
|
||||
|
||||
<title>httparse - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'httparse', ty: 'mod', relpath: '../'};</script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>httparse</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-0' class='srclink' href='../src/httparse/lib.rs.html#1-838' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'>
|
||||
<h1 id='httparse' class='section-header'><a href='#httparse'>httparse</a></h1>
|
||||
<p>A push library for parsing HTTP/1.x requests and responses.</p>
|
||||
|
||||
<p>The focus is on speed and safety. Unsafe code is used to keep parsing fast,
|
||||
but unsafety is contained in a submodule, with invariants enforced. The
|
||||
parsing internals use an <code>Iterator</code> instead of direct indexing, while
|
||||
skipping bounds checks.</p>
|
||||
|
||||
<p>The speed is comparable to the fast picohttpparser, currently being around
|
||||
1.6 times slower than pico. Improvements can be made as a <code>likely</code>
|
||||
intrinsic, and simd, are stabilized in rustc.</p>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Header.html'
|
||||
title='httparse::Header'>Header</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Represents a parsed header.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.InvalidChunkSize.html'
|
||||
title='httparse::InvalidChunkSize'>InvalidChunkSize</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An error in parsing a chunk size.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Request.html'
|
||||
title='httparse::Request'>Request</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A parsed Request.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Response.html'
|
||||
title='httparse::Response'>Response</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A parsed Response.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.Error.html'
|
||||
title='httparse::Error'>Error</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An error in parsing.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.Status.html'
|
||||
title='httparse::Status'>Status</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The result of a successful parse pass.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='constant' href='constant.EMPTY_HEADER.html'
|
||||
title='httparse::EMPTY_HEADER'>EMPTY_HEADER</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An empty header, useful for constructing a <code>Header</code> array to pass in for
|
||||
parsing.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='fn' href='fn.parse_chunk_size.html'
|
||||
title='httparse::parse_chunk_size'>parse_chunk_size</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Parse a buffer of bytes as a chunk size.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='fn' href='fn.parse_headers.html'
|
||||
title='httparse::parse_headers'>parse_headers</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Parse a buffer of bytes as headers.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.Result.html'
|
||||
title='httparse::Result'>Result</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A Result of any parsing action.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
httparse/sidebar-items.js
Normal file
1
httparse/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"constant":[["EMPTY_HEADER","An empty header, useful for constructing a `Header` array to pass in for parsing."]],"enum":[["Error","An error in parsing."],["Status","The result of a successful parse pass."]],"fn":[["parse_chunk_size","Parse a buffer of bytes as a chunk size."],["parse_headers","Parse a buffer of bytes as headers."]],"struct":[["Header","Represents a parsed header."],["InvalidChunkSize","An error in parsing a chunk size."],["Request","A parsed Request."],["Response","A parsed Response."]],"type":[["Result","A Result of any parsing action."]]});
|
141
httparse/struct.Header.html
Normal file
141
httparse/struct.Header.html
Normal file
|
@ -0,0 +1,141 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Header` struct in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Header">
|
||||
|
||||
<title>httparse::Header - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'Header', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>httparse</a>::<wbr><a class='struct' href=''>Header</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-307' class='srclink' href='../src/httparse/lib.rs.html#298-308' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Header<'a> {
|
||||
pub name: &'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>,
|
||||
pub value: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'a [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>,
|
||||
}</pre><div class='docblock'><p>Represents a parsed header.</p>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.name' class='structfield'><code>name: &'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The name portion of a header.</p>
|
||||
|
||||
<p>A header name must be valid ASCII-US, so it's safe to store as a <code>&str</code>.</p>
|
||||
</div><span id='structfield.value' class='structfield'><code>value: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'a [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The value portion of a header.</p>
|
||||
|
||||
<p>While headers <strong>should</strong> be ASCII-US, the specification allows for
|
||||
values that may not be, and so the value is stored as bytes.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-275' class='srclink' href='../src/httparse/lib.rs.html#297' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-283' class='srclink' href='../src/httparse/lib.rs.html#297' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-299' class='srclink' href='../src/httparse/lib.rs.html#297' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-305' class='srclink' href='../src/httparse/lib.rs.html#297' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
124
httparse/struct.InvalidChunkSize.html
Normal file
124
httparse/struct.InvalidChunkSize.html
Normal file
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `InvalidChunkSize` struct in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, InvalidChunkSize">
|
||||
|
||||
<title>httparse::InvalidChunkSize - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'InvalidChunkSize', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>httparse</a>::<wbr><a class='struct' href=''>InvalidChunkSize</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-139' class='srclink' href='../src/httparse/lib.rs.html#114' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct InvalidChunkSize;</pre><div class='docblock'><p>An error in parsing a chunk size.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../httparse/struct.InvalidChunkSize.html' title='httparse::InvalidChunkSize'>InvalidChunkSize</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-127' class='srclink' href='../src/httparse/lib.rs.html#113' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../httparse/struct.InvalidChunkSize.html' title='httparse::InvalidChunkSize'>InvalidChunkSize</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-130' class='srclink' href='../src/httparse/lib.rs.html#113' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class='struct' href='../httparse/struct.InvalidChunkSize.html' title='httparse::InvalidChunkSize'>InvalidChunkSize</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../httparse/struct.InvalidChunkSize.html' title='httparse::InvalidChunkSize'>InvalidChunkSize</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-134' class='srclink' href='../src/httparse/lib.rs.html#113' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
155
httparse/struct.Request.html
Normal file
155
httparse/struct.Request.html
Normal file
|
@ -0,0 +1,155 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Request` struct in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Request">
|
||||
|
||||
<title>httparse::Request - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'Request', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>httparse</a>::<wbr><a class='struct' href=''>Request</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-189' class='srclink' href='../src/httparse/lib.rs.html#191-200' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Request<'headers, 'buf: 'headers> {
|
||||
pub method: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'buf <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>,
|
||||
pub path: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'buf <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>,
|
||||
pub version: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>,
|
||||
pub headers: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'headers mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'buf><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>,
|
||||
}</pre><div class='docblock'><p>A parsed Request.</p>
|
||||
|
||||
<p>The optional values will be <code>None</code> if a parse was not complete, and did not
|
||||
parse the associated property. This allows you to inspect the parts that
|
||||
could be parsed, before reading more, in case you wish to exit early.</p>
|
||||
|
||||
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>buf</span> <span class='op'>=</span> <span class='string'>b"GET /404 HTTP/1.1\r\nHost:"</span>;
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>headers</span> <span class='op'>=</span> [<span class='ident'>httparse</span>::<span class='ident'>EMPTY_HEADER</span>; <span class='number'>16</span>];
|
||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>req</span> <span class='op'>=</span> <span class='ident'>httparse</span>::<span class='ident'>Request</span>::<span class='ident'>new</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>headers</span>);
|
||||
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='ident'>req</span>.<span class='ident'>parse</span>(<span class='ident'>buf</span>).<span class='ident'>unwrap</span>();
|
||||
<span class='kw'>if</span> <span class='ident'>res</span>.<span class='ident'>is_partial</span>() {
|
||||
<span class='kw'>match</span> <span class='ident'>req</span>.<span class='ident'>path</span> {
|
||||
<span class='prelude-val'>Some</span>(<span class='kw-2'>ref</span> <span class='ident'>path</span>) <span class='op'>=></span> {
|
||||
<span class='comment'>// check router for path.</span>
|
||||
<span class='comment'>// /404 doesn't exist? we could stop parsing</span>
|
||||
},
|
||||
<span class='prelude-val'>None</span> <span class='op'>=></span> {
|
||||
<span class='comment'>// must read more and parse again</span>
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.method' class='structfield'><code>method: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'buf <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The request method, such as <code>GET</code>.</p>
|
||||
</div><span id='structfield.path' class='structfield'><code>path: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'buf <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The request path, such as <code>/about-us</code>.</p>
|
||||
</div><span id='structfield.version' class='structfield'><code>version: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The request version, such as <code>HTTP/1.1</code>.</p>
|
||||
</div><span id='structfield.headers' class='structfield'><code>headers: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'headers mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'buf><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The request headers.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'h, 'b> <a class='struct' href='../httparse/struct.Request.html' title='httparse::Request'>Request</a><'h, 'b></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-196' class='srclink' href='../src/httparse/lib.rs.html#202-229' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(headers: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'h mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'b><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='struct' href='../httparse/struct.Request.html' title='httparse::Request'>Request</a><'h, 'b></code></h4>
|
||||
<div class='docblock'><p>Creates a new Request, using a slice of headers you allocate.</p>
|
||||
</div><h4 id='method.parse' class='method'><code>fn <a href='#method.parse' class='fnname'>parse</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'b [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='../httparse/type.Result.html' title='httparse::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Try to parse a buffer of bytes into the Request.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
135
httparse/struct.Response.html
Normal file
135
httparse/struct.Response.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Response` struct in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Response">
|
||||
|
||||
<title>httparse::Response - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'Response', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>httparse</a>::<wbr><a class='struct' href=''>Response</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-235' class='srclink' href='../src/httparse/lib.rs.html#255-264' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Response<'headers, 'buf: 'headers> {
|
||||
pub version: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>,
|
||||
pub code: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>>,
|
||||
pub reason: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'buf <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>,
|
||||
pub headers: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'headers mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'buf><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>,
|
||||
}</pre><div class='docblock'><p>A parsed Response.</p>
|
||||
|
||||
<p>See <code>Request</code> docs for explanation of optional values.</p>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.version' class='structfield'><code>version: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The response version, such as <code>HTTP/1.1</code>.</p>
|
||||
</div><span id='structfield.code' class='structfield'><code>code: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The response code, such as <code>200</code>.</p>
|
||||
</div><span id='structfield.reason' class='structfield'><code>reason: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&'buf <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The response reason-phrase, such as <code>OK</code>.</p>
|
||||
</div><span id='structfield.headers' class='structfield'><code>headers: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'headers mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'buf><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>THe response headers.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'h, 'b> <a class='struct' href='../httparse/struct.Response.html' title='httparse::Response'>Response</a><'h, 'b></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-242' class='srclink' href='../src/httparse/lib.rs.html#266-294' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(headers: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'h mut [</a><a class='struct' href='../httparse/struct.Header.html' title='httparse::Header'>Header</a><'b><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='struct' href='../httparse/struct.Response.html' title='httparse::Response'>Response</a><'h, 'b></code></h4>
|
||||
<div class='docblock'><p>Creates a new <code>Response</code> using a slice of <code>Header</code>s you have allocated.</p>
|
||||
</div><h4 id='method.parse' class='method'><code>fn <a href='#method.parse' class='fnname'>parse</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'b [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='../httparse/type.Result.html' title='httparse::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Try to parse a buffer of bytes into this <code>Response</code>.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
119
httparse/type.Result.html
Normal file
119
httparse/type.Result.html
Normal file
|
@ -0,0 +1,119 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Result` type in crate `httparse`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Result">
|
||||
|
||||
<title>httparse::Result - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='index.html'>httparse</a></p><script>window.sidebarCurrent = {name: 'Result', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='index.html'>httparse</a>::<wbr><a class='type' href=''>Result</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-141' class='srclink' href='../src/httparse/lib.rs.html#121' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type Result<T> = <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='../httparse/enum.Status.html' title='httparse::Status'>Status</a><T>, <a class='enum' href='../httparse/enum.Error.html' title='httparse::Error'>Error</a>>;</pre><div class='docblock'><p>A Result of any parsing action.</p>
|
||||
|
||||
<p>If the input is invalid, an <code>Error</code> will be returned. Note that incomplete
|
||||
data is not considered invalid, and so will not return an error, but rather
|
||||
a <code>Ok(Status::Partial)</code>.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../";
|
||||
window.currentCrate = "httparse";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
|
||||
<script defer src="../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
146
hyper/client/enum.Body.html
Normal file
146
hyper/client/enum.Body.html
Normal file
|
@ -0,0 +1,146 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Body` enum in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Body">
|
||||
|
||||
<title>hyper::client::Body - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a></p><script>window.sidebarCurrent = {name: 'Body', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a>::<wbr><a class='enum' href=''>Body</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-806' class='srclink' href='../../src/hyper/client/mod.rs.html#370-377' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum Body<'a> {
|
||||
ChunkedBody(&'a mut <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> + 'a),
|
||||
SizedBody(&'a mut <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> + 'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>),
|
||||
BufBody(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'a [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>),
|
||||
}</pre><div class='docblock'><p>An enum of possible body types for a Request.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.ChunkedBody' class='variant'><code>ChunkedBody(&'a mut <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> + 'a)</code></span><div class='docblock'><p>A Reader does not necessarily know it's size, so it is chunked.</p>
|
||||
</div><span id='variant.SizedBody' class='variant'><code>SizedBody(&'a mut <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> + 'a, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>)</code></span><div class='docblock'><p>For Readers that can know their size, like a <code>File</code>.</p>
|
||||
</div><span id='variant.BufBody' class='variant'><code>BufBody(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&'a [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>)</code></span><div class='docblock'><p>A String has a size, and uses Content-Length.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> for <a class='enum' href='../../hyper/client/enum.Body.html' title='hyper::client::Body'>Body</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-822' class='srclink' href='../../src/hyper/client/mod.rs.html#389-398' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.read' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read' class='fnname'>read</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Pull some bytes from this source into the specified buffer, returning how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></p>
|
||||
</div><h4 id='method.read_to_end' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&mut self, buf: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></p>
|
||||
</div><h4 id='method.read_to_string' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&mut self, buf: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></p>
|
||||
</div><h4 id='method.read_exact' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div></h4>
|
||||
<div class='docblock'><p>Read the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></p>
|
||||
</div><h4 id='method.by_ref' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates a "by reference" adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></p>
|
||||
</div><h4 id='method.bytes' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html' title='std::io::Bytes'>Bytes</a><Self></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Transforms this <code>Read</code> instance to an <code>Iterator</code> over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></p>
|
||||
</div><h4 id='method.chars' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Chars.html' title='std::io::Chars'>Chars</a><Self></code></h4>
|
||||
<div class='stability'><em class='stab unstable'>Unstable (<code>io</code>)<p>: the semantics of a partial read/write of where errors happen is currently unclear and may change</p>
|
||||
</em></div><div class='docblock'><p>Transforms this <code>Read</code> instance to an <code>Iterator</code> over <code>char</code>s. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars">Read more</a></p>
|
||||
</div><h4 id='method.chain' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain' class='fnname'>chain</a><R>(self, next: R) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Chain.html' title='std::io::Chain'>Chain</a><Self, R> <span class='where'>where R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a></span></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates an adaptor which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></p>
|
||||
</div><h4 id='method.take' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Take.html' title='std::io::Take'>Take</a><Self></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a, R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><&'a mut R> for <a class='enum' href='../../hyper/client/enum.Body.html' title='hyper::client::Body'>Body</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-842' class='srclink' href='../../src/hyper/client/mod.rs.html#421-426' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(r: &'a mut R) -> <a class='enum' href='../../hyper/client/enum.Body.html' title='hyper::client::Body'>Body</a><'a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
135
hyper/client/enum.RedirectPolicy.html
Normal file
135
hyper/client/enum.RedirectPolicy.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `RedirectPolicy` enum in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, RedirectPolicy">
|
||||
|
||||
<title>hyper::client::RedirectPolicy - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a></p><script>window.sidebarCurrent = {name: 'RedirectPolicy', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a>::<wbr><a class='enum' href=''>RedirectPolicy</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-862' class='srclink' href='../../src/hyper/client/mod.rs.html#454-461' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum RedirectPolicy {
|
||||
FollowNone,
|
||||
FollowAll,
|
||||
FollowIf(fn(&<a class='struct' href='../../hyper/struct.Url.html' title='hyper::Url'>Url</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>),
|
||||
}</pre><div class='docblock'><p>Behavior regarding how to handle redirects within a Client.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.FollowNone' class='variant'><code>FollowNone</code></span><div class='docblock'><p>Don't follow any redirects.</p>
|
||||
</div><span id='variant.FollowAll' class='variant'><code>FollowAll</code></span><div class='docblock'><p>Follow all redirects.</p>
|
||||
</div><span id='variant.FollowIf' class='variant'><code>FollowIf(fn(&<a class='struct' href='../../hyper/struct.Url.html' title='hyper::Url'>Url</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></span><div class='docblock'><p>Follow a redirect if the contained function returns true.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-861' class='srclink' href='../../src/hyper/client/mod.rs.html#453' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-868' class='srclink' href='../../src/hyper/client/mod.rs.html#463-471' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, fmt: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-872' class='srclink' href='../../src/hyper/client/mod.rs.html#474-478' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a></code></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-875' class='srclink' href='../../src/hyper/client/mod.rs.html#480-484' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a></code></h4>
|
||||
<div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
232
hyper/client/index.html
Normal file
232
hyper/client/index.html
Normal file
|
@ -0,0 +1,232 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `client` mod in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, client">
|
||||
|
||||
<title>hyper::client - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a></p><script>window.sidebarCurrent = {name: 'client', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>hyper</a>::<wbr><a class='mod' href=''>client</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-108' class='srclink' href='../../src/hyper/client/mod.rs.html#1-644' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>HTTP Client</p>
|
||||
|
||||
<h1 id='usage' class='section-header'><a href='#usage'>Usage</a></h1>
|
||||
<p>The <code>Client</code> API is designed for most people to make HTTP requests.
|
||||
It utilizes the lower level <code>Request</code> API.</p>
|
||||
|
||||
<h2 id='get' class='section-header'><a href='#get'>GET</a></h2>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>client</span> <span class='op'>=</span> <span class='ident'>Client</span>::<span class='ident'>new</span>();
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='ident'>client</span>.<span class='ident'>get</span>(<span class='string'>"http://example.domain"</span>).<span class='ident'>send</span>().<span class='ident'>unwrap</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>res</span>.<span class='ident'>status</span>, <span class='ident'>hyper</span>::<span class='prelude-val'>Ok</span>);</pre>
|
||||
|
||||
<p>The returned value is a <code>Response</code>, which provides easy access to
|
||||
the <code>status</code>, the <code>headers</code>, and the response body via the <code>Read</code>
|
||||
trait.</p>
|
||||
|
||||
<h2 id='post' class='section-header'><a href='#post'>POST</a></h2>
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>let</span> <span class='ident'>client</span> <span class='op'>=</span> <span class='ident'>Client</span>::<span class='ident'>new</span>();
|
||||
|
||||
<span class='kw'>let</span> <span class='ident'>res</span> <span class='op'>=</span> <span class='ident'>client</span>.<span class='ident'>post</span>(<span class='string'>"http://example.domain"</span>)
|
||||
.<span class='ident'>body</span>(<span class='string'>"foo=bar"</span>)
|
||||
.<span class='ident'>send</span>()
|
||||
.<span class='ident'>unwrap</span>();
|
||||
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='ident'>res</span>.<span class='ident'>status</span>, <span class='ident'>hyper</span>::<span class='prelude-val'>Ok</span>);</pre>
|
||||
|
||||
<h1 id='sync' class='section-header'><a href='#sync'>Sync</a></h1>
|
||||
<p>The <code>Client</code> implements <code>Sync</code>, so you can share it among multiple threads
|
||||
and make multiple requests simultaneously.</p>
|
||||
|
||||
<pre class='rust rust-example-rendered'>
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>sync</span>::<span class='ident'>Arc</span>;
|
||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>thread</span>;
|
||||
|
||||
<span class='comment'>// Note: an Arc is used here because `thread::spawn` creates threads that</span>
|
||||
<span class='comment'>// can outlive the main thread, so we must use reference counting to keep</span>
|
||||
<span class='comment'>// the Client alive long enough. Scoped threads could skip the Arc.</span>
|
||||
<span class='kw'>let</span> <span class='ident'>client</span> <span class='op'>=</span> <span class='ident'>Arc</span>::<span class='ident'>new</span>(<span class='ident'>Client</span>::<span class='ident'>new</span>());
|
||||
<span class='kw'>let</span> <span class='ident'>clone1</span> <span class='op'>=</span> <span class='ident'>client</span>.<span class='ident'>clone</span>();
|
||||
<span class='kw'>let</span> <span class='ident'>clone2</span> <span class='op'>=</span> <span class='ident'>client</span>.<span class='ident'>clone</span>();
|
||||
<span class='ident'>thread</span>::<span class='ident'>spawn</span>(<span class='kw'>move</span> <span class='op'>||</span> {
|
||||
<span class='ident'>clone1</span>.<span class='ident'>get</span>(<span class='string'>"http://example.domain"</span>).<span class='ident'>send</span>().<span class='ident'>unwrap</span>();
|
||||
});
|
||||
<span class='ident'>thread</span>::<span class='ident'>spawn</span>(<span class='kw'>move</span> <span class='op'>||</span> {
|
||||
<span class='ident'>clone2</span>.<span class='ident'>post</span>(<span class='string'>"http://example.domain/post"</span>).<span class='ident'>body</span>(<span class='string'>"foo=bar"</span>).<span class='ident'>send</span>().<span class='ident'>unwrap</span>();
|
||||
});</pre>
|
||||
</div><h2 id='reexports' class='section-header'><a href="#reexports">Reexports</a></h2>
|
||||
<table><tr><td><code>pub use self::<a class='mod'
|
||||
href='./pool/index.html'>pool</a>::<a class='struct' href='../../hyper/client/pool/struct.Pool.html' title='hyper::client::pool::Pool'>Pool</a>;</code></td></tr><tr><td><code>pub use self::<a class='mod'
|
||||
href='./request/index.html'>request</a>::<a class='struct' href='../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a>;</code></td></tr><tr><td><code>pub use self::<a class='mod'
|
||||
href='./response/index.html'>response</a>::<a class='struct' href='../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='mod' href='pool/index.html'
|
||||
title='hyper::client::pool'>pool</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Client Connection Pooling</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='mod' href='request/index.html'
|
||||
title='hyper::client::request'>request</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Client Requests</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='mod' href='response/index.html'
|
||||
title='hyper::client::response'>response</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Client Responses</p>
|
||||
</td>
|
||||
</tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Client.html'
|
||||
title='hyper::client::Client'>Client</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A Client to use additional features with Requests.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.ProxyConfig.html'
|
||||
title='hyper::client::ProxyConfig'>ProxyConfig</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Proxy server configuration with a custom TLS wrapper.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.RequestBuilder.html'
|
||||
title='hyper::client::RequestBuilder'>RequestBuilder</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Options for an individual Request.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.Body.html'
|
||||
title='hyper::client::Body'>Body</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>An enum of possible body types for a Request.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.RedirectPolicy.html'
|
||||
title='hyper::client::RedirectPolicy'>RedirectPolicy</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Behavior regarding how to handle redirects within a Client.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='trait' href='trait.IntoUrl.html'
|
||||
title='hyper::client::IntoUrl'>IntoUrl</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A helper trait to convert common objects into a Url.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
137
hyper/client/pool/index.html
Normal file
137
hyper/client/pool/index.html
Normal file
|
@ -0,0 +1,137 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `pool` mod in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, pool">
|
||||
|
||||
<title>hyper::client::pool - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a></p><script>window.sidebarCurrent = {name: 'pool', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a class='mod' href=''>pool</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-256' class='srclink' href='../../../src/hyper/client/pool.rs.html#1-302' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Client Connection Pooling</p>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Config.html'
|
||||
title='hyper::client::pool::Config'>Config</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Config options for the <code>Pool</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Pool.html'
|
||||
title='hyper::client::pool::Pool'>Pool</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>The <code>NetworkConnector</code> that behaves as a connection pool used by hyper's <code>Client</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.PooledStream.html'
|
||||
title='hyper::client::pool::PooledStream'>PooledStream</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A Stream that will try to be returned to the Pool when dropped.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hyper/client/pool/sidebar-items.js
Normal file
1
hyper/client/pool/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"struct":[["Config","Config options for the `Pool`."],["Pool","The `NetworkConnector` that behaves as a connection pool used by hyper's `Client`."],["PooledStream","A Stream that will try to be returned to the Pool when dropped."]]});
|
125
hyper/client/pool/struct.Config.html
Normal file
125
hyper/client/pool/struct.Config.html
Normal file
|
@ -0,0 +1,125 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Config` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Config">
|
||||
|
||||
<title>hyper::client::pool::Config - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>pool</a></p><script>window.sidebarCurrent = {name: 'Config', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>pool</a>::<wbr><a class='struct' href=''>Config</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-275' class='srclink' href='../../../src/hyper/client/pool.rs.html#21-24' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Config {
|
||||
pub max_idle: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>,
|
||||
}</pre><div class='docblock'><p>Config options for the <code>Pool</code>.</p>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.max_idle' class='structfield'><code>max_idle: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The maximum idle connections <em>per host</em>.</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../../hyper/client/pool/struct.Config.html' title='hyper::client::pool::Config'>Config</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-269' class='srclink' href='../../../src/hyper/client/pool.rs.html#20' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../../../hyper/client/pool/struct.Config.html' title='hyper::client::pool::Config'>Config</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-277' class='srclink' href='../../../src/hyper/client/pool.rs.html#26-33' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class='struct' href='../../../hyper/client/pool/struct.Config.html' title='hyper::client::pool::Config'>Config</a></code></h4>
|
||||
<div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
130
hyper/client/pool/struct.Pool.html
Normal file
130
hyper/client/pool/struct.Pool.html
Normal file
|
@ -0,0 +1,130 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Pool` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Pool">
|
||||
|
||||
<title>hyper::client::pool::Pool - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>pool</a></p><script>window.sidebarCurrent = {name: 'Pool', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>pool</a>::<wbr><a class='struct' href=''>Pool</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-265' class='srclink' href='../../../src/hyper/client/pool.rs.html#14-17' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Pool<C: <a class='trait' href='../../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a>> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>The <code>NetworkConnector</code> that behaves as a connection pool used by hyper's <code>Client</code>.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../../hyper/client/pool/struct.Pool.html' title='hyper::client::pool::Pool'>Pool</a><DefaultConnector></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-344' class='srclink' href='../../../src/hyper/client/pool.rs.html#64-70' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(config: <a class='struct' href='../../../hyper/client/pool/struct.Config.html' title='hyper::client::pool::Config'>Config</a>) -> <a class='struct' href='../../../hyper/client/pool/struct.Pool.html' title='hyper::client::pool::Pool'>Pool</a><DefaultConnector></code></h4>
|
||||
<div class='docblock'><p>Creates a <code>Pool</code> with a <code>DefaultConnector</code>.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<C: <a class='trait' href='../../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a>> <a class='struct' href='../../../hyper/client/pool/struct.Pool.html' title='hyper::client::pool::Pool'>Pool</a><C></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-347' class='srclink' href='../../../src/hyper/client/pool.rs.html#72-90' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.with_connector' class='method'><code>fn <a href='#method.with_connector' class='fnname'>with_connector</a>(config: <a class='struct' href='../../../hyper/client/pool/struct.Config.html' title='hyper::client::pool::Config'>Config</a>, connector: C) -> <a class='struct' href='../../../hyper/client/pool/struct.Pool.html' title='hyper::client::pool::Pool'>Pool</a><C></code></h4>
|
||||
<div class='docblock'><p>Creates a <code>Pool</code> with a specified <code>NetworkConnector</code>.</p>
|
||||
</div><h4 id='method.clear_idle' class='method'><code>fn <a href='#method.clear_idle' class='fnname'>clear_idle</a>(&mut self)</code></h4>
|
||||
<div class='docblock'><p>Clear all idle connections from the Pool, closing them.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<C: <a class='trait' href='../../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a><Stream=S>, S: <a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>> <a class='trait' href='../../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a> for <a class='struct' href='../../../hyper/client/pool/struct.Pool.html' title='hyper::client::pool::Pool'>Pool</a><C></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-365' class='srclink' href='../../../src/hyper/client/pool.rs.html#102-137' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='associatedtype.Stream' class='type'><code>type <a href='../../../hyper/net/trait.NetworkConnector.html#associatedtype.Stream' class='type'>Stream</a> = <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S></code></h4>
|
||||
<div class='docblock'><p>Type of <code>Stream</code> to create</p>
|
||||
</div><h4 id='method.connect' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkConnector.html#tymethod.connect' class='fnname'>connect</a>(&self, host: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, scheme: &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S>></code></h4>
|
||||
<div class='docblock'><p>Connect to a remote address.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
168
hyper/client/pool/struct.PooledStream.html
Normal file
168
hyper/client/pool/struct.PooledStream.html
Normal file
|
@ -0,0 +1,168 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `PooledStream` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, PooledStream">
|
||||
|
||||
<title>hyper::client::pool::PooledStream - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>pool</a></p><script>window.sidebarCurrent = {name: 'PooledStream', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>pool</a>::<wbr><a class='struct' href=''>PooledStream</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-389' class='srclink' href='../../../src/hyper/client/pool.rs.html#140-144' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct PooledStream<S> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A Stream that will try to be returned to the Pool when dropped.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<S: <a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a>> <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-399' class='srclink' href='../../../src/hyper/client/pool.rs.html#157-162' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.into_inner' class='method'><code>fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -> S</code></h4>
|
||||
<div class='docblock'><p>Take the wrapped stream out of the pool completely.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl<S> <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S> <span class='where'>where S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> + 'static</span></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-394' class='srclink' href='../../../src/hyper/client/pool.rs.html#147-155' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, fmt: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<S: <a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> for <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-417' class='srclink' href='../../../src/hyper/client/pool.rs.html#171-185' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.read' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read' class='fnname'>read</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Pull some bytes from this source into the specified buffer, returning how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></p>
|
||||
</div><h4 id='method.read_to_end' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&mut self, buf: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></p>
|
||||
</div><h4 id='method.read_to_string' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&mut self, buf: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></p>
|
||||
</div><h4 id='method.read_exact' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div></h4>
|
||||
<div class='docblock'><p>Read the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></p>
|
||||
</div><h4 id='method.by_ref' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates a "by reference" adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></p>
|
||||
</div><h4 id='method.bytes' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html' title='std::io::Bytes'>Bytes</a><Self></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Transforms this <code>Read</code> instance to an <code>Iterator</code> over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></p>
|
||||
</div><h4 id='method.chars' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Chars.html' title='std::io::Chars'>Chars</a><Self></code></h4>
|
||||
<div class='stability'><em class='stab unstable'>Unstable (<code>io</code>)<p>: the semantics of a partial read/write of where errors happen is currently unclear and may change</p>
|
||||
</em></div><div class='docblock'><p>Transforms this <code>Read</code> instance to an <code>Iterator</code> over <code>char</code>s. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars">Read more</a></p>
|
||||
</div><h4 id='method.chain' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain' class='fnname'>chain</a><R>(self, next: R) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Chain.html' title='std::io::Chain'>Chain</a><Self, R> <span class='where'>where R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a></span></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates an adaptor which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></p>
|
||||
</div><h4 id='method.take' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Take.html' title='std::io::Take'>Take</a><Self></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<S: <a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a>> <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html' title='std::io::Write'>Write</a> for <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-423' class='srclink' href='../../../src/hyper/client/pool.rs.html#187-197' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.write' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write' class='fnname'>write</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Write a buffer into this object, returning how many bytes were written. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write">Read more</a></p>
|
||||
</div><h4 id='method.flush' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush' class='fnname'>flush</a>(&mut self) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Flush this output stream, ensuring that all intermediately buffered contents reach their destination. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush">Read more</a></p>
|
||||
</div><h4 id='method.write_all' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all' class='fnname'>write_all</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Attempts to write an entire buffer into this write. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all">Read more</a></p>
|
||||
</div><h4 id='method.write_fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&mut self, fmt: <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html' title='core::fmt::Arguments'>Arguments</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Writes a formatted string into this writer, returning any error encountered. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt">Read more</a></p>
|
||||
</div><h4 id='method.by_ref-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates a "by reference" adaptor for this instance of <code>Write</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl<S: <a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a>> <a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> for <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-430' class='srclink' href='../../../src/hyper/client/pool.rs.html#199-233' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.peer_addr' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkStream.html#tymethod.peer_addr' class='fnname'>peer_addr</a>(&mut self) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='enum' href='https://doc.rust-lang.org/nightly/std/net/addr/enum.SocketAddr.html' title='std::net::addr::SocketAddr'>SocketAddr</a>></code></h4>
|
||||
<div class='docblock'><p>Get the remote address of the underlying connection.</p>
|
||||
</div><h4 id='method.set_read_timeout' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkStream.html#tymethod.set_read_timeout' class='fnname'>set_read_timeout</a>(&self, dur: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Set the maximum time to wait for a read to complete.</p>
|
||||
</div><h4 id='method.set_write_timeout' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkStream.html#tymethod.set_write_timeout' class='fnname'>set_write_timeout</a>(&self, dur: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Set the maximum time to wait for a write to complete.</p>
|
||||
</div><h4 id='method.close' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkStream.html#method.close' class='fnname'>close</a>(&mut self, how: <a class='enum' href='https://doc.rust-lang.org/nightly/std/net/enum.Shutdown.html' title='std::net::Shutdown'>Shutdown</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>This will be called when Stream should no longer be kept alive.</p>
|
||||
</div><h4 id='method.set_previous_response_expected_no_content' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkStream.html#method.set_previous_response_expected_no_content' class='fnname'>set_previous_response_expected_no_content</a>(&mut self, expected: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>)</code></h4>
|
||||
<h4 id='method.previous_response_expected_no_content' class='method'><code>fn <a href='../../../hyper/net/trait.NetworkStream.html#method.previous_response_expected_no_content' class='fnname'>previous_response_expected_no_content</a>(&self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
|
||||
</div><h3 class='impl'><span class='in-band'><code>impl<S> <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='../../../hyper/client/pool/struct.PooledStream.html' title='hyper::client::pool::PooledStream'>PooledStream</a><S></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-457' class='srclink' href='../../../src/hyper/client/pool.rs.html#235-247' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.drop' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&mut self)</code></h4>
|
||||
<div class='docblock'><p>A method called when the value goes out of scope. <a href="https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
124
hyper/client/request/index.html
Normal file
124
hyper/client/request/index.html
Normal file
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `request` mod in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, request">
|
||||
|
||||
<title>hyper::client::request - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a></p><script>window.sidebarCurrent = {name: 'request', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a class='mod' href=''>request</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-468' class='srclink' href='../../../src/hyper/client/request.rs.html#1-314' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Client Requests</p>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Request.html'
|
||||
title='hyper::client::request::Request'>Request</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A client request to a remote server.
|
||||
The W type tracks the state of the request, Fresh vs Streaming.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hyper/client/request/sidebar-items.js
Normal file
1
hyper/client/request/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"struct":[["Request","A client request to a remote server. The W type tracks the state of the request, Fresh vs Streaming."]]});
|
163
hyper/client/request/struct.Request.html
Normal file
163
hyper/client/request/struct.Request.html
Normal file
|
@ -0,0 +1,163 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Request` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Request">
|
||||
|
||||
<title>hyper::client::request::Request - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>request</a></p><script>window.sidebarCurrent = {name: 'Request', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>request</a>::<wbr><a class='struct' href=''>Request</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-481' class='srclink' href='../../../src/hyper/client/request.rs.html#22-34' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Request<W> {
|
||||
pub url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>,
|
||||
pub version: <a class='enum' href='../../../hyper/version/enum.HttpVersion.html' title='hyper::version::HttpVersion'>HttpVersion</a>,
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A client request to a remote server.
|
||||
The W type tracks the state of the request, Fresh vs Streaming.</p>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.url' class='structfield'><code>url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The target URI for this request.</p>
|
||||
</div><span id='structfield.version' class='structfield'><code>version: <a class='enum' href='../../../hyper/version/enum.HttpVersion.html' title='hyper::version::HttpVersion'>HttpVersion</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The HTTP version of this request.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<W> <a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><W></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-489' class='srclink' href='../../../src/hyper/client/request.rs.html#36-56' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.headers' class='method'><code>fn <a href='#method.headers' class='fnname'>headers</a>(&self) -> &<a class='struct' href='../../../hyper/header/struct.Headers.html' title='hyper::header::Headers'>Headers</a></code></h4>
|
||||
<div class='docblock'><p>Read the Request headers.</p>
|
||||
</div><h4 id='method.method' class='method'><code>fn <a href='#method.method' class='fnname'>method</a>(&self) -> <a class='enum' href='../../../hyper/method/enum.Method.html' title='hyper::method::Method'>Method</a></code></h4>
|
||||
<div class='docblock'><p>Read the Request method.</p>
|
||||
</div><h4 id='method.set_write_timeout' class='method'><code>fn <a href='#method.set_write_timeout' class='fnname'>set_write_timeout</a>(&self, dur: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Set the write timeout.</p>
|
||||
</div><h4 id='method.set_read_timeout' class='method'><code>fn <a href='#method.set_read_timeout' class='fnname'>set_read_timeout</a>(&self, dur: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Set the read timeout.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Fresh.html' title='hyper::net::Fresh'>Fresh</a>></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-501' class='srclink' href='../../../src/hyper/client/request.rs.html#58-136' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.with_message' class='method'><code>fn <a href='#method.with_message' class='fnname'>with_message</a>(method: <a class='enum' href='../../../hyper/method/enum.Method.html' title='hyper::method::Method'>Method</a>, url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>, message: <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a><<a class='trait' href='../../../hyper/http/message/trait.HttpMessage.html' title='hyper::http::message::HttpMessage'>HttpMessage</a>>) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Fresh.html' title='hyper::net::Fresh'>Fresh</a>>></code></h4>
|
||||
<div class='docblock'><p>Create a new <code>Request<Fresh></code> that will use the given <code>HttpMessage</code> for its communication
|
||||
with the server. This implies that the given <code>HttpMessage</code> instance has already been
|
||||
properly initialized by the caller (e.g. a TCP connection's already established).</p>
|
||||
</div><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(method: <a class='enum' href='../../../hyper/method/enum.Method.html' title='hyper::method::Method'>Method</a>, url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Fresh.html' title='hyper::net::Fresh'>Fresh</a>>></code></h4>
|
||||
<div class='docblock'><p>Create a new client request.</p>
|
||||
</div><h4 id='method.with_connector' class='method'><code>fn <a href='#method.with_connector' class='fnname'>with_connector</a><C, S>(method: <a class='enum' href='../../../hyper/method/enum.Method.html' title='hyper::method::Method'>Method</a>, url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>, connector: &C) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Fresh.html' title='hyper::net::Fresh'>Fresh</a>>> <span class='where'>where C: <a class='trait' href='../../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a><Stream=S>, S: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a><<a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>>></span></code></h4>
|
||||
<div class='docblock'><p>Create a new client request with a specific underlying NetworkStream.</p>
|
||||
</div><h4 id='method.start' class='method'><code>fn <a href='#method.start' class='fnname'>start</a>(self) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Streaming.html' title='hyper::net::Streaming'>Streaming</a>>></code></h4>
|
||||
<div class='docblock'><p>Consume a Fresh Request, writing the headers and method,
|
||||
returning a Streaming Request.</p>
|
||||
</div><h4 id='method.headers_mut' class='method'><code>fn <a href='#method.headers_mut' class='fnname'>headers_mut</a>(&mut self) -> &mut <a class='struct' href='../../../hyper/header/struct.Headers.html' title='hyper::header::Headers'>Headers</a></code></h4>
|
||||
<div class='docblock'><p>Get a mutable reference to the Request headers.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Streaming.html' title='hyper::net::Streaming'>Streaming</a>></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-540' class='srclink' href='../../../src/hyper/client/request.rs.html#140-147' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.send' class='method'><code>fn <a href='#method.send' class='fnname'>send</a>(self) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a>></code></h4>
|
||||
<div class='docblock'><p>Completes writing the request, and returns a response to read from.</p>
|
||||
|
||||
<p>Consumes the Request.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html' title='std::io::Write'>Write</a> for <a class='struct' href='../../../hyper/client/request/struct.Request.html' title='hyper::client::request::Request'>Request</a><<a class='enum' href='../../../hyper/net/enum.Streaming.html' title='hyper::net::Streaming'>Streaming</a>></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-543' class='srclink' href='../../../src/hyper/client/request.rs.html#149-171' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.write' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write' class='fnname'>write</a>(&mut self, msg: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Write a buffer into this object, returning how many bytes were written. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.write">Read more</a></p>
|
||||
</div><h4 id='method.flush' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush' class='fnname'>flush</a>(&mut self) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>></code></h4>
|
||||
<div class='docblock'><p>Flush this output stream, ensuring that all intermediately buffered contents reach their destination. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#tymethod.flush">Read more</a></p>
|
||||
</div><h4 id='method.write_all' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all' class='fnname'>write_all</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Attempts to write an entire buffer into this write. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_all">Read more</a></p>
|
||||
</div><h4 id='method.write_fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt' class='fnname'>write_fmt</a>(&mut self, fmt: <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Arguments.html' title='core::fmt::Arguments'>Arguments</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Writes a formatted string into this writer, returning any error encountered. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.write_fmt">Read more</a></p>
|
||||
</div><h4 id='method.by_ref' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates a "by reference" adaptor for this instance of <code>Write</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html#method.by_ref">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
123
hyper/client/response/index.html
Normal file
123
hyper/client/response/index.html
Normal file
|
@ -0,0 +1,123 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `response` mod in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, response">
|
||||
|
||||
<title>hyper::client::response - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a></p><script>window.sidebarCurrent = {name: 'response', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a class='mod' href=''>response</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-553' class='srclink' href='../../../src/hyper/client/response.rs.html#1-234' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Client Responses</p>
|
||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='struct' href='struct.Response.html'
|
||||
title='hyper::client::response::Response'>Response</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A response for a client request to a remote server.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hyper/client/response/sidebar-items.js
Normal file
1
hyper/client/response/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"struct":[["Response","A response for a client request to a remote server."]]});
|
163
hyper/client/response/struct.Response.html
Normal file
163
hyper/client/response/struct.Response.html
Normal file
|
@ -0,0 +1,163 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Response` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Response">
|
||||
|
||||
<title>hyper::client::response::Response - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>response</a></p><script>window.sidebarCurrent = {name: 'Response', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>hyper</a>::<wbr><a href='../index.html'>client</a>::<wbr><a href='index.html'>response</a>::<wbr><a class='struct' href=''>Response</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-573' class='srclink' href='../../../src/hyper/client/response.rs.html#15-26' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Response {
|
||||
pub status: <a class='enum' href='../../../hyper/status/enum.StatusCode.html' title='hyper::status::StatusCode'>StatusCode</a>,
|
||||
pub headers: <a class='struct' href='../../../hyper/header/struct.Headers.html' title='hyper::header::Headers'>Headers</a>,
|
||||
pub version: <a class='enum' href='../../../hyper/version/enum.HttpVersion.html' title='hyper::version::HttpVersion'>HttpVersion</a>,
|
||||
pub url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>,
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A response for a client request to a remote server.</p>
|
||||
</div><h2 class='fields'>Fields</h2><span id='structfield.status' class='structfield'><code>status: <a class='enum' href='../../../hyper/status/enum.StatusCode.html' title='hyper::status::StatusCode'>StatusCode</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The status from the server.</p>
|
||||
</div><span id='structfield.headers' class='structfield'><code>headers: <a class='struct' href='../../../hyper/header/struct.Headers.html' title='hyper::header::Headers'>Headers</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The headers from the server.</p>
|
||||
</div><span id='structfield.version' class='structfield'><code>version: <a class='enum' href='../../../hyper/version/enum.HttpVersion.html' title='hyper::version::HttpVersion'>HttpVersion</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The HTTP version of this response from the server.</p>
|
||||
</div><span id='structfield.url' class='structfield'><code>url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a></code>
|
||||
</span><span class='stab '></span><div class='docblock'><p>The final URL of this response.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-580' class='srclink' href='../../../src/hyper/client/response.rs.html#28-65' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>, stream: <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a><<a class='trait' href='../../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a>>) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a>></code></h4>
|
||||
<div class='docblock'><p>Creates a new response from a server.</p>
|
||||
</div><h4 id='method.with_message' class='method'><code>fn <a href='#method.with_message' class='fnname'>with_message</a>(url: <a class='struct' href='../../../hyper/struct.Url.html' title='hyper::Url'>Url</a>, message: <a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a><<a class='trait' href='../../../hyper/http/message/trait.HttpMessage.html' title='hyper::http::message::HttpMessage'>HttpMessage</a>>) -> <a class='type' href='../../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a>></code></h4>
|
||||
<div class='docblock'><p>Creates a new response received from the server on the given <code>HttpMessage</code>.</p>
|
||||
</div><h4 id='method.status_raw' class='method'><code>fn <a href='#method.status_raw' class='fnname'>status_raw</a>(&self) -> &<a class='struct' href='../../../hyper/http/struct.RawStatus.html' title='hyper::http::RawStatus'>RawStatus</a></code></h4>
|
||||
<div class='docblock'><p>Get the raw status code and reason.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-562' class='srclink' href='../../../src/hyper/client/response.rs.html#14' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a> for <a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-610' class='srclink' href='../../../src/hyper/client/response.rs.html#68-79' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='docblock'><p>Read the response body.</p>
|
||||
</div><div class='impl-items'><h4 id='method.read' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read' class='fnname'>read</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/std/io/error/type.Result.html' title='std::io::error::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>></code></h4>
|
||||
<div class='docblock'><p>Pull some bytes from this source into the specified buffer, returning how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></p>
|
||||
</div><h4 id='method.read_to_end' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&mut self, buf: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></p>
|
||||
</div><h4 id='method.read_to_string' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&mut self, buf: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Read all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></p>
|
||||
</div><h4 id='method.read_exact' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</a>(&mut self, buf: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&mut [</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>, <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>Error</a>></code><div class='since' title='Stable since Rust version 1.6.0'>1.6.0</div></h4>
|
||||
<div class='docblock'><p>Read the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></p>
|
||||
</div><h4 id='method.by_ref' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> &mut Self</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates a "by reference" adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></p>
|
||||
</div><h4 id='method.bytes' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html' title='std::io::Bytes'>Bytes</a><Self></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Transforms this <code>Read</code> instance to an <code>Iterator</code> over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></p>
|
||||
</div><h4 id='method.chars' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars' class='fnname'>chars</a>(self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Chars.html' title='std::io::Chars'>Chars</a><Self></code></h4>
|
||||
<div class='stability'><em class='stab unstable'>Unstable (<code>io</code>)<p>: the semantics of a partial read/write of where errors happen is currently unclear and may change</p>
|
||||
</em></div><div class='docblock'><p>Transforms this <code>Read</code> instance to an <code>Iterator</code> over <code>char</code>s. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars">Read more</a></p>
|
||||
</div><h4 id='method.chain' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain' class='fnname'>chain</a><R>(self, next: R) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Chain.html' title='std::io::Chain'>Chain</a><Self, R> <span class='where'>where R: <a class='trait' href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html' title='std::io::Read'>Read</a></span></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates an adaptor which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></p>
|
||||
</div><h4 id='method.take' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a>) -> <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/struct.Take.html' title='std::io::Take'>Take</a><Self></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
|
||||
<div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='../../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-616' class='srclink' href='../../../src/hyper/client/response.rs.html#81-97' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.drop' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&mut self)</code></h4>
|
||||
<div class='docblock'><p>A method called when the value goes out of scope. <a href="https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../../jquery.js"></script>
|
||||
<script src="../../../main.js"></script>
|
||||
|
||||
<script defer src="../../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hyper/client/sidebar-items.js
Normal file
1
hyper/client/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"enum":[["Body","An enum of possible body types for a Request."],["RedirectPolicy","Behavior regarding how to handle redirects within a Client."]],"mod":[["pool","Client Connection Pooling"],["request","Client Requests"],["response","Client Responses"]],"struct":[["Client","A Client to use additional features with Requests."],["ProxyConfig","Proxy server configuration with a custom TLS wrapper."],["RequestBuilder","Options for an individual Request."]],"trait":[["IntoUrl","A helper trait to convert common objects into a Url."]]});
|
156
hyper/client/struct.Client.html
Normal file
156
hyper/client/struct.Client.html
Normal file
|
@ -0,0 +1,156 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Client` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Client">
|
||||
|
||||
<title>hyper::client::Client - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a></p><script>window.sidebarCurrent = {name: 'Client', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a>::<wbr><a class='struct' href=''>Client</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-641' class='srclink' href='../../src/hyper/client/mod.rs.html#95-101' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct Client {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>A Client to use additional features with Requests.</p>
|
||||
|
||||
<p>Clients can handle things such as: redirect policy, connection pooling.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-651' class='srclink' href='../../src/hyper/client/mod.rs.html#114-223' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>() -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></h4>
|
||||
<div class='docblock'><p>Create a new Client.</p>
|
||||
</div><h4 id='method.with_pool_config' class='method'><code>fn <a href='#method.with_pool_config' class='fnname'>with_pool_config</a>(config: <a class='struct' href='../../hyper/client/pool/struct.Config.html' title='hyper::client::pool::Config'>Config</a>) -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></h4>
|
||||
<div class='docblock'><p>Create a new Client with a configured Pool Config.</p>
|
||||
</div><h4 id='method.with_http_proxy' class='method'><code>fn <a href='#method.with_http_proxy' class='fnname'>with_http_proxy</a><H>(host: H, port: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>) -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a> <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a><'static, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>></span></code></h4>
|
||||
<h4 id='method.with_proxy_config' class='method'><code>fn <a href='#method.with_proxy_config' class='fnname'>with_proxy_config</a><H, S>(proxy_config: <a class='struct' href='../../hyper/client/struct.ProxyConfig.html' title='hyper::client::ProxyConfig'>ProxyConfig</a><H, S>) -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a> <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a><'static, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>>, S: <a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a><<a class='struct' href='../../hyper/net/struct.HttpConnector.html' title='hyper::net::HttpConnector'>HttpConnector</a>::Stream> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + 'static</span></code></h4>
|
||||
<h4 id='method.with_connector' class='method'><code>fn <a href='#method.with_connector' class='fnname'>with_connector</a><C, S>(connector: C) -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a> <span class='where'>where C: <a class='trait' href='../../hyper/net/trait.NetworkConnector.html' title='hyper::net::NetworkConnector'>NetworkConnector</a><Stream=S> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + 'static, S: <a class='trait' href='../../hyper/net/trait.NetworkStream.html' title='hyper::net::NetworkStream'>NetworkStream</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a></span></code></h4>
|
||||
<div class='docblock'><p>Create a new client with a specific connector.</p>
|
||||
</div><h4 id='method.with_protocol' class='method'><code>fn <a href='#method.with_protocol' class='fnname'>with_protocol</a><P: <a class='trait' href='../../hyper/http/message/trait.Protocol.html' title='hyper::http::message::Protocol'>Protocol</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + 'static>(protocol: P) -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></h4>
|
||||
<div class='docblock'><p>Create a new client with a specific <code>Protocol</code>.</p>
|
||||
</div><h4 id='method.set_redirect_policy' class='method'><code>fn <a href='#method.set_redirect_policy' class='fnname'>set_redirect_policy</a>(&mut self, policy: <a class='enum' href='../../hyper/client/enum.RedirectPolicy.html' title='hyper::client::RedirectPolicy'>RedirectPolicy</a>)</code></h4>
|
||||
<div class='docblock'><p>Set the RedirectPolicy.</p>
|
||||
</div><h4 id='method.set_read_timeout' class='method'><code>fn <a href='#method.set_read_timeout' class='fnname'>set_read_timeout</a>(&mut self, dur: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>>)</code></h4>
|
||||
<div class='docblock'><p>Set the read timeout value for all requests.</p>
|
||||
</div><h4 id='method.set_write_timeout' class='method'><code>fn <a href='#method.set_write_timeout' class='fnname'>set_write_timeout</a>(&mut self, dur: <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html' title='std::time::duration::Duration'>Duration</a>>)</code></h4>
|
||||
<div class='docblock'><p>Set the write timeout value for all requests.</p>
|
||||
</div><h4 id='method.get' class='method'><code>fn <a href='#method.get' class='fnname'>get</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a Get request.</p>
|
||||
</div><h4 id='method.head' class='method'><code>fn <a href='#method.head' class='fnname'>head</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a Head request.</p>
|
||||
</div><h4 id='method.patch' class='method'><code>fn <a href='#method.patch' class='fnname'>patch</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a Patch request.</p>
|
||||
</div><h4 id='method.post' class='method'><code>fn <a href='#method.post' class='fnname'>post</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a Post request.</p>
|
||||
</div><h4 id='method.put' class='method'><code>fn <a href='#method.put' class='fnname'>put</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a Put request.</p>
|
||||
</div><h4 id='method.delete' class='method'><code>fn <a href='#method.delete' class='fnname'>delete</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a Delete request.</p>
|
||||
</div><h4 id='method.request' class='method'><code>fn <a href='#method.request' class='fnname'>request</a><U: <a class='trait' href='../../hyper/client/trait.IntoUrl.html' title='hyper::client::IntoUrl'>IntoUrl</a>>(&self, method: <a class='enum' href='../../hyper/method/enum.Method.html' title='hyper::method::Method'>Method</a>, url: U) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a></code></h4>
|
||||
<div class='docblock'><p>Build a new request using this Client.</p>
|
||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-647' class='srclink' href='../../src/hyper/client/mod.rs.html#103-112' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, fmt: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html' title='core::default::Default'>Default</a> for <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-715' class='srclink' href='../../src/hyper/client/mod.rs.html#225-227' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.default' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class='struct' href='../../hyper/client/struct.Client.html' title='hyper::client::Client'>Client</a></code></h4>
|
||||
<div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
115
hyper/client/struct.ProxyConfig.html
Normal file
115
hyper/client/struct.ProxyConfig.html
Normal file
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `ProxyConfig` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, ProxyConfig">
|
||||
|
||||
<title>hyper::client::ProxyConfig - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a></p><script>window.sidebarCurrent = {name: 'ProxyConfig', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a>::<wbr><a class='struct' href=''>ProxyConfig</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-634' class='srclink' href='../../src/hyper/client/mod.rs.html#88-90' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct ProxyConfig<H, S> <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='enum' href='https://doc.rust-lang.org/nightly/collections/borrow/enum.Cow.html' title='collections::borrow::Cow'>Cow</a><'static, <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>>>, S: <a class='trait' href='../../hyper/net/trait.SslClient.html' title='hyper::net::SslClient'>SslClient</a><<a class='struct' href='../../hyper/net/struct.HttpConnector.html' title='hyper::net::HttpConnector'>HttpConnector</a>::Stream> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + 'static</span>(pub H, pub <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a>, pub S);</pre><div class='docblock'><p>Proxy server configuration with a custom TLS wrapper.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
129
hyper/client/struct.RequestBuilder.html
Normal file
129
hyper/client/struct.RequestBuilder.html
Normal file
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `RequestBuilder` struct in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, RequestBuilder">
|
||||
|
||||
<title>hyper::client::RequestBuilder - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a></p><script>window.sidebarCurrent = {name: 'RequestBuilder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content struct">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a>::<wbr><a class='struct' href=''>RequestBuilder</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-717' class='srclink' href='../../src/hyper/client/mod.rs.html#233-248' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct RequestBuilder<'a> {
|
||||
// some fields omitted
|
||||
}</pre><div class='docblock'><p>Options for an individual Request.</p>
|
||||
|
||||
<p>One of these will be built for you if you use one of the convenience
|
||||
methods, such as <code>get()</code>, <code>post()</code>, etc.</p>
|
||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl<'a> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a><'a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-724' class='srclink' href='../../src/hyper/client/mod.rs.html#250-367' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.body' class='method'><code>fn <a href='#method.body' class='fnname'>body</a><B: <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html' title='core::convert::Into'>Into</a><<a class='enum' href='../../hyper/client/enum.Body.html' title='hyper::client::Body'>Body</a><'a>>>(self, body: B) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a><'a></code></h4>
|
||||
<div class='docblock'><p>Set a request body to be sent.</p>
|
||||
</div><h4 id='method.headers' class='method'><code>fn <a href='#method.headers' class='fnname'>headers</a>(self, headers: <a class='struct' href='../../hyper/header/struct.Headers.html' title='hyper::header::Headers'>Headers</a>) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a><'a></code></h4>
|
||||
<div class='docblock'><p>Add additional headers to the request.</p>
|
||||
</div><h4 id='method.header' class='method'><code>fn <a href='#method.header' class='fnname'>header</a><H: <a class='trait' href='../../hyper/header/trait.Header.html' title='hyper::header::Header'>Header</a> + <a class='trait' href='../../hyper/header/trait.HeaderFormat.html' title='hyper::header::HeaderFormat'>HeaderFormat</a>>(self, header: H) -> <a class='struct' href='../../hyper/client/struct.RequestBuilder.html' title='hyper::client::RequestBuilder'>RequestBuilder</a><'a></code></h4>
|
||||
<div class='docblock'><p>Add an individual new header to the request.</p>
|
||||
</div><h4 id='method.send' class='method'><code>fn <a href='#method.send' class='fnname'>send</a>(self) -> <a class='type' href='../../hyper/error/type.Result.html' title='hyper::error::Result'>Result</a><<a class='struct' href='../../hyper/client/response/struct.Response.html' title='hyper::client::response::Response'>Response</a>></code></h4>
|
||||
<div class='docblock'><p>Execute this request and receive a Response back.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
129
hyper/client/trait.IntoUrl.html
Normal file
129
hyper/client/trait.IntoUrl.html
Normal file
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `IntoUrl` trait in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, IntoUrl">
|
||||
|
||||
<title>hyper::client::IntoUrl - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a></p><script>window.sidebarCurrent = {name: 'IntoUrl', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content trait">
|
||||
<h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>client</a>::<wbr><a class='trait' href=''>IntoUrl</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-847' class='srclink' href='../../src/hyper/client/mod.rs.html#429-432' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust trait'>pub trait IntoUrl {
|
||||
fn <a href='#tymethod.into_url' class='fnname'>into_url</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../../hyper/struct.Url.html' title='hyper::Url'>Url</a>, <a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>UrlError</a>>;
|
||||
}</pre><div class='docblock'><p>A helper trait to convert common objects into a Url.</p>
|
||||
</div>
|
||||
<h2 id='required-methods'>Required Methods</h2>
|
||||
<div class='methods'>
|
||||
<h3 id='tymethod.into_url' class='method stab '><code>fn <a href='#tymethod.into_url' class='fnname'>into_url</a>(self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='struct' href='../../hyper/struct.Url.html' title='hyper::Url'>Url</a>, <a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>UrlError</a>></code></h3><div class='docblock'><p>Consumes the object, trying to return a Url.</p>
|
||||
</div></div>
|
||||
<h2 id='implementors'>Implementors</h2>
|
||||
<ul class='item-list' id='implementors-list'>
|
||||
<li><code>impl IntoUrl for <a class='struct' href='../../hyper/struct.Url.html' title='hyper::Url'>Url</a></code></li>
|
||||
<li><code>impl<'a> IntoUrl for &'a <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></li>
|
||||
<li><code>impl<'a> IntoUrl for &'a <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a></code></li>
|
||||
</ul><script type="text/javascript" async
|
||||
src="../../implementors/hyper/client/trait.IntoUrl.js">
|
||||
</script></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
170
hyper/error/enum.Error.html
Normal file
170
hyper/error/enum.Error.html
Normal file
|
@ -0,0 +1,170 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Error` enum in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Error">
|
||||
|
||||
<title>hyper::error::Error - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>error</a></p><script>window.sidebarCurrent = {name: 'Error', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content enum">
|
||||
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>hyper</a>::<wbr><a href='index.html'>error</a>::<wbr><a class='enum' href=''>Error</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-927' class='srclink' href='../../src/hyper/error.rs.html#34-58' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust enum'>pub enum Error {
|
||||
Method,
|
||||
Uri(<a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>ParseError</a>),
|
||||
Version,
|
||||
Header,
|
||||
TooLarge,
|
||||
Status,
|
||||
Io(<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>),
|
||||
Ssl(<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a><<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a>>),
|
||||
Http2(<a class='enum' href='../../solicit/http/enum.HttpError.html' title='solicit::http::HttpError'>Http2Error</a>),
|
||||
Utf8(<a class='struct' href='https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html' title='core::str::Utf8Error'>Utf8Error</a>),
|
||||
// some variants omitted
|
||||
}</pre><div class='docblock'><p>A set of errors that can occur parsing HTTP streams.</p>
|
||||
</div><h2 class='variants'>Variants</h2>
|
||||
<span id='variant.Method' class='variant'><code>Method</code></span><div class='docblock'><p>An invalid <code>Method</code>, such as <code>GE,T</code>.</p>
|
||||
</div><span id='variant.Uri' class='variant'><code>Uri(<a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>ParseError</a>)</code></span><div class='docblock'><p>An invalid <code>RequestUri</code>, such as <code>exam ple.domain</code>.</p>
|
||||
</div><span id='variant.Version' class='variant'><code>Version</code></span><div class='docblock'><p>An invalid <code>HttpVersion</code>, such as <code>HTP/1.1</code></p>
|
||||
</div><span id='variant.Header' class='variant'><code>Header</code></span><div class='docblock'><p>An invalid <code>Header</code>.</p>
|
||||
</div><span id='variant.TooLarge' class='variant'><code>TooLarge</code></span><div class='docblock'><p>A message head is too large to be reasonable.</p>
|
||||
</div><span id='variant.Status' class='variant'><code>Status</code></span><div class='docblock'><p>An invalid <code>Status</code>, such as <code>1337 ELITE</code>.</p>
|
||||
</div><span id='variant.Io' class='variant'><code>Io(<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>)</code></span><div class='docblock'><p>An <code>io::Error</code> that occurred while trying to read or write to a network stream.</p>
|
||||
</div><span id='variant.Ssl' class='variant'><code>Ssl(<a class='struct' href='https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html' title='alloc::boxed::Box'>Box</a><<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a>>)</code></span><div class='docblock'><p>An error from a SSL library.</p>
|
||||
</div><span id='variant.Http2' class='variant'><code>Http2(<a class='enum' href='../../solicit/http/enum.HttpError.html' title='solicit::http::HttpError'>Http2Error</a>)</code></span><div class='docblock'><p>An HTTP/2-specific error, coming from the <code>solicit</code> library.</p>
|
||||
</div><span id='variant.Utf8' class='variant'><code>Utf8(<a class='struct' href='https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html' title='core::str::Utf8Error'>Utf8Error</a>)</code></span><div class='docblock'><p>Parsing a field as string failed</p>
|
||||
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-906' class='srclink' href='../../src/hyper/error.rs.html#33' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html' title='core::fmt::Display'>Display</a> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-949' class='srclink' href='../../src/hyper/error.rs.html#69-79' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-958' class='srclink' href='../../src/hyper/error.rs.html#81-107' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.description' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description' class='fnname'>description</a>(&self) -> &<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
|
||||
<div class='docblock'><p>A short description of the error. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description">Read more</a></p>
|
||||
</div><h4 id='method.cause' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause' class='fnname'>cause</a>(&self) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><&<a class='trait' href='https://doc.rust-lang.org/nightly/std/error/trait.Error.html' title='std::error::Error'>StdError</a>></code></h4>
|
||||
<div class='docblock'><p>The lower-level cause of this error, if any.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-978' class='srclink' href='../../src/hyper/error.rs.html#109-113' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html' title='std::io::error::Error'>IoError</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>ParseError</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-981' class='srclink' href='../../src/hyper/error.rs.html#115-119' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from-1' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='enum' href='../../url/parser/enum.ParseError.html' title='url::parser::ParseError'>ParseError</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='enum' href='../../openssl/ssl/error/enum.SslError.html' title='openssl::ssl::error::SslError'>SslError</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-984' class='srclink' href='../../src/hyper/error.rs.html#122-129' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from-2' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='enum' href='../../openssl/ssl/error/enum.SslError.html' title='openssl::ssl::error::SslError'>SslError</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='struct' href='https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html' title='core::str::Utf8Error'>Utf8Error</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-989' class='srclink' href='../../src/hyper/error.rs.html#131-135' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from-3' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html' title='core::str::Utf8Error'>Utf8Error</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.FromUtf8Error.html' title='collections::string::FromUtf8Error'>FromUtf8Error</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-992' class='srclink' href='../../src/hyper/error.rs.html#137-141' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from-4' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.FromUtf8Error.html' title='collections::string::FromUtf8Error'>FromUtf8Error</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='enum' href='../../httparse/enum.Error.html' title='httparse::Error'>Error</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-995' class='srclink' href='../../src/hyper/error.rs.html#143-155' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from-5' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='enum' href='../../httparse/enum.Error.html' title='httparse::Error'>Error</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='enum' href='../../solicit/http/enum.HttpError.html' title='solicit::http::HttpError'>Http2Error</a>> for <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-998' class='srclink' href='../../src/hyper/error.rs.html#157-161' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.from-6' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(err: <a class='enum' href='../../solicit/http/enum.HttpError.html' title='solicit::http::HttpError'>Http2Error</a>) -> <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a></code></h4>
|
||||
<div class='docblock'><p>Performs the conversion.</p>
|
||||
</div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
131
hyper/error/index.html
Normal file
131
hyper/error/index.html
Normal file
|
@ -0,0 +1,131 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `error` mod in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, error">
|
||||
|
||||
<title>hyper::error - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a></p><script>window.sidebarCurrent = {name: 'error', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content mod">
|
||||
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>hyper</a>::<wbr><a class='mod' href=''>error</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-893' class='srclink' href='../../src/hyper/error.rs.html#1-231' title='goto source code'>[src]</a></span></h1>
|
||||
<div class='docblock'><p>Error and Result module.</p>
|
||||
</div><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='enum' href='enum.Error.html'
|
||||
title='hyper::error::Error'>Error</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>A set of errors that can occur parsing HTTP streams.</p>
|
||||
</td>
|
||||
</tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
||||
<table>
|
||||
<tr class=' module-item'>
|
||||
<td><a class='type' href='type.Result.html'
|
||||
title='hyper::error::Result'>Result</a></td>
|
||||
<td class='docblock short'>
|
||||
<p>Result type often returned from methods that can have hyper <code>Error</code>s.</p>
|
||||
</td>
|
||||
</tr></table></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
1
hyper/error/sidebar-items.js
Normal file
1
hyper/error/sidebar-items.js
Normal file
|
@ -0,0 +1 @@
|
|||
initSidebarItems({"enum":[["Error","A set of errors that can occur parsing HTTP streams."]],"type":[["Result","Result type often returned from methods that can have hyper `Error`s."]]});
|
115
hyper/error/type.Result.html
Normal file
115
hyper/error/type.Result.html
Normal file
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="rustdoc">
|
||||
<meta name="description" content="API documentation for the Rust `Result` type in crate `hyper`.">
|
||||
<meta name="keywords" content="rust, rustlang, rust-lang, Result">
|
||||
|
||||
<title>hyper::error::Result - Rust</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="rustdoc">
|
||||
<!--[if lte IE 8]>
|
||||
<div class="warning">
|
||||
This old browser is unsupported and will most likely display funky
|
||||
things.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<p class='location'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>error</a></p><script>window.sidebarCurrent = {name: 'Result', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
||||
</nav>
|
||||
|
||||
<nav class="sub">
|
||||
<form class="search-form js-only">
|
||||
<div class="search-container">
|
||||
<input class="search-input" name="search"
|
||||
autocomplete="off"
|
||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||||
type="search">
|
||||
</div>
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content type">
|
||||
<h1 class='fqn'><span class='in-band'><a href='../index.html'>hyper</a>::<wbr><a href='index.html'>error</a>::<wbr><a class='type' href=''>Result</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a id='src-904' class='srclink' href='../../src/hyper/error.rs.html#30' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust typedef'>type Result<T> = <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><T, <a class='enum' href='../../hyper/error/enum.Error.html' title='hyper::error::Error'>Error</a>>;</pre><div class='docblock'><p>Result type often returned from methods that can have hyper <code>Error</code>s.</p>
|
||||
</div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
<aside id="help" class="hidden">
|
||||
<div>
|
||||
<h1 class="hidden">Help</h1>
|
||||
|
||||
<div class="shortcuts">
|
||||
<h2>Keyboard Shortcuts</h2>
|
||||
|
||||
<dl>
|
||||
<dt>?</dt>
|
||||
<dd>Show this help dialog</dd>
|
||||
<dt>S</dt>
|
||||
<dd>Focus the search field</dd>
|
||||
<dt>⇤</dt>
|
||||
<dd>Move up in search results</dd>
|
||||
<dt>⇥</dt>
|
||||
<dd>Move down in search results</dd>
|
||||
<dt>⏎</dt>
|
||||
<dd>Go to active search result</dd>
|
||||
<dt>+</dt>
|
||||
<dd>Collapse/expand all sections</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="infos">
|
||||
<h2>Search Tricks</h2>
|
||||
|
||||
<p>
|
||||
Prefix searches with a type followed by a colon (e.g.
|
||||
<code>fn:</code>) to restrict the search to a given type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||||
<code>struct</code>, <code>enum</code>,
|
||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||||
and <code>const</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Search functions by type signature (e.g.
|
||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
window.rootPath = "../../";
|
||||
window.currentCrate = "hyper";
|
||||
window.playgroundUrl = "";
|
||||
</script>
|
||||
<script src="../../jquery.js"></script>
|
||||
<script src="../../main.js"></script>
|
||||
|
||||
<script defer src="../../search-index.js"></script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/accept/struct.Accept.html
Normal file
10
hyper/header/accept/struct.Accept.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.Accept.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.Accept.html">../../../hyper/header/struct.Accept.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.Accept.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/accept_charset/struct.AcceptCharset.html
Normal file
10
hyper/header/accept_charset/struct.AcceptCharset.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AcceptCharset.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AcceptCharset.html">../../../hyper/header/struct.AcceptCharset.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AcceptCharset.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/accept_encoding/struct.AcceptEncoding.html
Normal file
10
hyper/header/accept_encoding/struct.AcceptEncoding.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AcceptEncoding.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AcceptEncoding.html">../../../hyper/header/struct.AcceptEncoding.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AcceptEncoding.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/accept_language/struct.AcceptLanguage.html
Normal file
10
hyper/header/accept_language/struct.AcceptLanguage.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AcceptLanguage.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AcceptLanguage.html">../../../hyper/header/struct.AcceptLanguage.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AcceptLanguage.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/accept_ranges/enum.RangeUnit.html
Normal file
10
hyper/header/accept_ranges/enum.RangeUnit.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/enum.RangeUnit.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/enum.RangeUnit.html">../../../hyper/header/enum.RangeUnit.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/enum.RangeUnit.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/accept_ranges/struct.AcceptRanges.html
Normal file
10
hyper/header/accept_ranges/struct.AcceptRanges.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AcceptRanges.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AcceptRanges.html">../../../hyper/header/struct.AcceptRanges.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AcceptRanges.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlAllowCredentials.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlAllowCredentials.html">../../../hyper/header/struct.AccessControlAllowCredentials.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlAllowCredentials.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlAllowHeaders.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlAllowHeaders.html">../../../hyper/header/struct.AccessControlAllowHeaders.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlAllowHeaders.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlAllowMethods.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlAllowMethods.html">../../../hyper/header/struct.AccessControlAllowMethods.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlAllowMethods.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/enum.AccessControlAllowOrigin.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/enum.AccessControlAllowOrigin.html">../../../hyper/header/enum.AccessControlAllowOrigin.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/enum.AccessControlAllowOrigin.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlExposeHeaders.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlExposeHeaders.html">../../../hyper/header/struct.AccessControlExposeHeaders.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlExposeHeaders.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlMaxAge.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlMaxAge.html">../../../hyper/header/struct.AccessControlMaxAge.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlMaxAge.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlRequestHeaders.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlRequestHeaders.html">../../../hyper/header/struct.AccessControlRequestHeaders.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlRequestHeaders.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.AccessControlRequestMethod.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.AccessControlRequestMethod.html">../../../hyper/header/struct.AccessControlRequestMethod.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.AccessControlRequestMethod.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/allow/struct.Allow.html
Normal file
10
hyper/header/allow/struct.Allow.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.Allow.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.Allow.html">../../../hyper/header/struct.Allow.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.Allow.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/authorization/struct.Authorization.html
Normal file
10
hyper/header/authorization/struct.Authorization.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.Authorization.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.Authorization.html">../../../hyper/header/struct.Authorization.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.Authorization.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
10
hyper/header/authorization/struct.Basic.html
Normal file
10
hyper/header/authorization/struct.Basic.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=../../../hyper/header/struct.Basic.html">
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="../../../hyper/header/struct.Basic.html">../../../hyper/header/struct.Basic.html</a>...</p>
|
||||
<script>location.replace("../../../hyper/header/struct.Basic.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue