diff options
Diffstat (limited to 'docs/en/cowboy/2.2/manual/cowboy_constraints/index.html')
-rw-r--r-- | docs/en/cowboy/2.2/manual/cowboy_constraints/index.html | 85 |
1 files changed, 22 insertions, 63 deletions
diff --git a/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html b/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html index 98a7305d..d5005eff 100644 --- a/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html +++ b/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html @@ -62,84 +62,43 @@ <h1 class="lined-header"><span>cowboy_constraints(3)</span></h1> -<div class="sect1"> <h2 id="_name">Name</h2> -<div class="sectionbody"> -<div class="paragraph"><p>cowboy_constraints - Constraints</p></div> -</div> -</div> -<div class="sect1"> +<p>cowboy_constraints - Constraints</p> <h2 id="_description">Description</h2> -<div class="sectionbody"> -<div class="paragraph"><p>The module <code>cowboy_constraints</code> defines the built-in -constraints in Cowboy and provides an interface for -manipulating these constraints.</p></div> -<div class="paragraph"><p>Constraints are functions that define what type of -input is allowed. They are used throughout Cowboy, -from the router to query strings to cookies.</p></div> -</div> -</div> -<div class="sect1"> +<p>The module <code>cowboy_constraints</code> defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.</p> +<p>Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.</p> <h2 id="_exports">Exports</h2> -<div class="sectionbody"> -<div class="paragraph"><p>Built-in constraints:</p></div> -<div class="ulist"><ul> -<li> -<p> -<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint -</p> +<p>Built-in constraints:</p> +<ul><li><a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint </li> -<li> -<p> -<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint -</p> +<li><a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint </li> -</ul></div> -</div> -</div> -<div class="sect1"> +</ul> <h2 id="_types">Types</h2> -<div class="sectionbody"> -<div class="sect2"> <h3 id="_constraint">constraint()</h3> -<div class="listingblock"> -<div class="content"><!-- Generator: GNU source-highlight +<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt><span style="font-weight: bold"><span style="color: #000000">constraint</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">int</span> | <span style="color: #FF6600">nonempty</span> | <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()</tt></pre></div></div> -<div class="paragraph"><p>A constraint function.</p></div> -<div class="paragraph"><p>The atom constraints are built-in, see the corresponding -function in the exports list above.</p></div> -</div> -<div class="sect2"> +<pre><tt><b><font color="#000000">constraint</font></b>() <font color="#990000">::</font> <font color="#FF6600">int</font> | <font color="#FF6600">nonempty</font> | <b><font color="#0000FF">fun</font></b>()</tt></pre> +</div></div> +<p>A constraint function.</p> +<p>The atom constraints are built-in, see the corresponding function in the exports list above.</p> <h3 id="_reason">reason()</h3> -<div class="listingblock"> -<div class="content"><!-- Generator: GNU source-highlight +<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt><span style="font-weight: bold"><span style="color: #000000">reason</span></span>() <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">constraint</span></span>(), <span style="color: #009900">Reason</span>, <span style="color: #009900">Value</span>} - -<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>() -<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div> -<div class="paragraph"><p>Reason for the constraint failure.</p></div> -<div class="paragraph"><p>It includes the constraint function in question, -a machine-readable error reason and the value that -made the constraint fail.</p></div> -</div> -</div> -</div> -<div class="sect1"> +<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> {<b><font color="#000000">constraint</font></b>(), <font color="#009900">Reason</font>, <font color="#009900">Value</font>} + +<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>() +<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre> +</div></div> +<p>Reason for the constraint failure.</p> +<p>It includes the constraint function in question, a machine-readable error reason and the value that made the constraint fail.</p> <h2 id="_see_also">See also</h2> -<div class="sectionbody"> -<div class="paragraph"><p><a href="..">cowboy(7)</a>, -<a href="../cowboy">cowboy(3)</a>, -<a href="../cowboy_router">cowboy_router(3)</a>, -<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, -<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div> -</div> -</div> +<p><a href="..">cowboy(7)</a>, <a href="../cowboy">cowboy(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p> + |