@@ -745,7 +745,10 @@ syntactically invalid, or if a header was forbidden.</p>
745
745
<li ><a name =" static_fields.from_list.0 " ></a > result< ; own< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; , <a href =" #header_error " ><a href =" #header_error " ><code >header-error</code ></a ></a >> ; </li >
746
746
</ul >
747
747
<h4 ><a name =" method_fields.get " ><code >[method]fields.get: func</code ></a ></h4 >
748
- <p >Get all of the values corresponding to a key.</p >
748
+ <p >Get all of the values corresponding to a key. If the key is not present
749
+ in this <a href =" #fields " ><code >fields</code ></a >, an empty list is returned. However, if the key is
750
+ present but empty, this is represented by a list with one or more
751
+ empty field-values present.</p >
749
752
<h5 >Params</h5 >
750
753
<ul >
751
754
<li ><a name =" method_fields.get.self " ><code >self</code ></a >: borrow< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; </li >
@@ -755,6 +758,18 @@ syntactically invalid, or if a header was forbidden.</p>
755
758
<ul >
756
759
<li ><a name =" method_fields.get.0 " ></a > list< ; <a href =" #field_value " ><a href =" #field_value " ><code >field-value</code ></a ></a >> ; </li >
757
760
</ul >
761
+ <h4 ><a name =" method_fields.has " ><code >[method]fields.has: func</code ></a ></h4 >
762
+ <p >Returns <code >true</code > when the key is present in this <a href =" #fields " ><code >fields</code ></a >. If the key is
763
+ syntactically invalid, <code >false</code > is returned.</p >
764
+ <h5 >Params</h5 >
765
+ <ul >
766
+ <li ><a name =" method_fields.has.self " ><code >self</code ></a >: borrow< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; </li >
767
+ <li ><a name =" method_fields.has.name " ><code >name</code ></a >: <a href =" #field_key " ><a href =" #field_key " ><code >field-key</code ></a ></a ></li >
768
+ </ul >
769
+ <h5 >Return values</h5 >
770
+ <ul >
771
+ <li ><a name =" method_fields.has.0 " ></a > <code >bool</code ></li >
772
+ </ul >
758
773
<h4 ><a name =" method_fields.set " ><code >[method]fields.set: func</code ></a ></h4 >
759
774
<p >Set all of the values for a key. Clears any existing values for that
760
775
key, if they have been set.</p >
0 commit comments