Skip to content

Commit 5731080

Browse files
author
Pat Hickey
committed
generate markdown
1 parent fece948 commit 5731080

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

proxy.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,11 @@ syntactically invalid when used with an operation that sets headers in a
760760
<p>This error indicates that a forbidden `field-key` was used when trying
761761
to set a header in a `fields`.
762762
</li>
763+
<li>
764+
<p><a name="header_error.immutable"><code>immutable</code></a></p>
765+
<p>This error indicates that the operation on the `fields` was not
766+
permitted because the fields are immutable.
767+
</li>
763768
</ul>
764769
<h4><a name="field_key"><code>type field-key</code></a></h4>
765770
<p><code>string</code></p>
@@ -810,12 +815,14 @@ are http-related errors.</p>
810815
</ul>
811816
<h4><a name="constructor_fields"><code>[constructor]fields: func</code></a></h4>
812817
<p>Construct an empty HTTP Fields.</p>
818+
<p>The resulting <a href="#fields"><code>fields</code></a> is mutable.</p>
813819
<h5>Return values</h5>
814820
<ul>
815821
<li><a name="constructor_fields.0"></a> own&lt;<a href="#fields"><a href="#fields"><code>fields</code></a></a>&gt;</li>
816822
</ul>
817823
<h4><a name="static_fields.from_list"><code>[static]fields.from-list: func</code></a></h4>
818824
<p>Construct an HTTP Fields.</p>
825+
<p>The resulting <a href="#fields"><code>fields</code></a> is mutable.</p>
819826
<p>The list represents each key-value pair in the Fields. Keys
820827
which have multiple values are represented by multiple entries in this
821828
list with the same key.</p>
@@ -847,6 +854,7 @@ syntactically invalid, or if a header was forbidden.</p>
847854
<h4><a name="method_fields.set"><code>[method]fields.set: func</code></a></h4>
848855
<p>Set all of the values for a key. Clears any existing values for that
849856
key, if they have been set.</p>
857+
<p>Fails with <code>header-error.immutable</code> if the <a href="#fields"><code>fields</code></a> are immutable.</p>
850858
<h5>Params</h5>
851859
<ul>
852860
<li><a name="method_fields.set.self"><code>self</code></a>: borrow&lt;<a href="#fields"><a href="#fields"><code>fields</code></a></a>&gt;</li>
@@ -860,6 +868,7 @@ key, if they have been set.</p>
860868
<h4><a name="method_fields.delete"><code>[method]fields.delete: func</code></a></h4>
861869
<p>Delete all values for a key. Does nothing if no values for the key
862870
exist.</p>
871+
<p>Fails with <code>header-error.immutable</code> if the <a href="#fields"><code>fields</code></a> are immutable.</p>
863872
<h5>Params</h5>
864873
<ul>
865874
<li><a name="method_fields.delete.self"><code>self</code></a>: borrow&lt;<a href="#fields"><a href="#fields"><code>fields</code></a></a>&gt;</li>
@@ -872,6 +881,7 @@ exist.</p>
872881
<h4><a name="method_fields.append"><code>[method]fields.append: func</code></a></h4>
873882
<p>Append a value for a key. Does not change or delete any existing
874883
values for that key.</p>
884+
<p>Fails with <code>header-error.immutable</code> if the <a href="#fields"><code>fields</code></a> are immutable.</p>
875885
<h5>Params</h5>
876886
<ul>
877887
<li><a name="method_fields.append.self"><code>self</code></a>: borrow&lt;<a href="#fields"><a href="#fields"><code>fields</code></a></a>&gt;</li>
@@ -898,7 +908,8 @@ list with the same key.</p>
898908
</ul>
899909
<h4><a name="method_fields.clone"><code>[method]fields.clone: func</code></a></h4>
900910
<p>Make a deep copy of the Fields. Equivelant in behavior to calling the
901-
<a href="#fields"><code>fields</code></a> constructor on the return value of <code>entries</code></p>
911+
<a href="#fields"><code>fields</code></a> constructor on the return value of <code>entries</code>. The resulting
912+
<a href="#fields"><code>fields</code></a> is mutable.</p>
902913
<h5>Params</h5>
903914
<ul>
904915
<li><a name="method_fields.clone.self"><code>self</code></a>: borrow&lt;<a href="#fields"><a href="#fields"><code>fields</code></a></a>&gt;</li>
@@ -948,7 +959,9 @@ list with the same key.</p>
948959
<li><a name="method_incoming_request.authority.0"></a> option&lt;<code>string</code>&gt;</li>
949960
</ul>
950961
<h4><a name="method_incoming_request.headers"><code>[method]incoming-request.headers: func</code></a></h4>
951-
<p>Returns the <a href="#headers"><code>headers</code></a> from the request.</p>
962+
<p>Get the <a href="#headers"><code>headers</code></a> associated with the request.</p>
963+
<p>The returned <a href="#headers"><code>headers</code></a> resource is immutable: <code>set</code>, <code>append</code>, and
964+
<code>delete</code> operations will fail with <code>header-error.immutable</code>.</p>
952965
<p>The <a href="#headers"><code>headers</code></a> returned are a child resource: it must be dropped before
953966
the parent <a href="#incoming_request"><code>incoming-request</code></a> is dropped. Dropping this
954967
<a href="#incoming_request"><code>incoming-request</code></a> before all children are dropped will trap.</p>
@@ -1102,6 +1115,8 @@ not a syntactically valid uri authority.</p>
11021115
</ul>
11031116
<h4><a name="method_outgoing_request.headers"><code>[method]outgoing-request.headers: func</code></a></h4>
11041117
<p>Get the headers associated with the Request.</p>
1118+
<p>The returned <a href="#headers"><code>headers</code></a> resource is immutable: <code>set</code>, <code>append</code>, and
1119+
<code>delete</code> operations will fail with <code>header-error.immutable</code>.</p>
11051120
<p>This headers resource is a child: it must be dropped before the parent
11061121
<a href="#outgoing_request"><code>outgoing-request</code></a> is dropped, or its ownership is transfered to
11071122
another component by e.g. <code>outgoing-handler.handle</code>.</p>
@@ -1212,6 +1227,10 @@ implementation determine how to respond with an HTTP error response.</p>
12121227
</ul>
12131228
<h4><a name="method_incoming_response.headers"><code>[method]incoming-response.headers: func</code></a></h4>
12141229
<p>Returns the headers from the incoming response.</p>
1230+
<p>The returned <a href="#headers"><code>headers</code></a> resource is immutable: <code>set</code>, <code>append</code>, and
1231+
<code>delete</code> operations will fail with <code>header-error.immutable</code>.</p>
1232+
<p>This headers resource is a child: it must be dropped before the parent
1233+
<a href="#incoming_response"><code>incoming-response</code></a> is dropped.</p>
12151234
<h5>Params</h5>
12161235
<ul>
12171236
<li><a name="method_incoming_response.headers.self"><code>self</code></a>: borrow&lt;<a href="#incoming_response"><a href="#incoming_response"><code>incoming-response</code></a></a>&gt;</li>
@@ -1284,6 +1303,10 @@ once the future is ready.</p>
12841303
as well as any trailers, were received successfully, or that an error
12851304
occured receiving them. The optional <a href="#trailers"><code>trailers</code></a> indicates whether or not
12861305
trailers were present in the body.</p>
1306+
<p>When some <a href="#trailers"><code>trailers</code></a> are returned by this method, the <a href="#trailers"><code>trailers</code></a>
1307+
resource is immutable, and a child. Use of the <code>set</code>, <code>append</code>, or
1308+
<code>delete</code> methods will return an error, and the resource must be
1309+
dropped before the parent <a href="#future_trailers"><code>future-trailers</code></a> is dropped.</p>
12871310
<h5>Params</h5>
12881311
<ul>
12891312
<li><a name="method_future_trailers.get.self"><code>self</code></a>: borrow&lt;<a href="#future_trailers"><a href="#future_trailers"><code>future-trailers</code></a></a>&gt;</li>
@@ -1331,6 +1354,8 @@ given is not a valid http status code.</p>
13311354
</ul>
13321355
<h4><a name="method_outgoing_response.headers"><code>[method]outgoing-response.headers: func</code></a></h4>
13331356
<p>Get the headers associated with the Request.</p>
1357+
<p>The returned <a href="#headers"><code>headers</code></a> resource is immutable: <code>set</code>, <code>append</code>, and
1358+
<code>delete</code> operations will fail with <code>header-error.immutable</code>.</p>
13341359
<p>This headers resource is a child: it must be dropped before the parent
13351360
<a href="#outgoing_request"><code>outgoing-request</code></a> is dropped, or its ownership is transfered to
13361361
another component by e.g. <code>outgoing-handler.handle</code>.</p>

0 commit comments

Comments
 (0)