From 2368dc53d0c724f1899aeb2874ba1a763e11f0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 29 Jan 2024 15:40:26 +0100 Subject: Cowboy 2.11 --- .../2.11/manual/cowboy_constraints.int/index.html | 203 +++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 docs/en/cowboy/2.11/manual/cowboy_constraints.int/index.html (limited to 'docs/en/cowboy/2.11/manual/cowboy_constraints.int/index.html') diff --git a/docs/en/cowboy/2.11/manual/cowboy_constraints.int/index.html b/docs/en/cowboy/2.11/manual/cowboy_constraints.int/index.html new file mode 100644 index 00000000..66d67b7c --- /dev/null +++ b/docs/en/cowboy/2.11/manual/cowboy_constraints.int/index.html @@ -0,0 +1,203 @@ + + + + + + + + + + Nine Nines: cowboy_constraints:int(3) + + + + + + + + + + + + + + + +
+
+
+
+ +

cowboy_constraints:int(3)

+ +

Name

+

cowboy_constraints:int - Integer constraint

+

Description

+

Constraint functions implement a number of different operations.

+
+
int(forward, Bin) -> {ok, Int} | {error, not_an_integer}
+
+Bin :: binary()
+Int :: integer()
+
+

Validate and convert the text representation of an integer.

+
+
int(reverse, Int) -> {ok, Bin} | {error, not_an_integer}
+
+

Convert an integer back to its text representation.

+
+
int(format_error, Error) -> HumanReadable
+
+Error         :: {not_an_integer, Bin | Int}
+HumanReadable :: iolist()
+
+

Generate a human-readable error message.

+

Arguments

+

Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.

+

Return value

+

The return value varies depending on the operation.

+

Changelog

+
  • 2.0: Interface modified to allow for a variety of operations. +
  • +
  • 1.0: Constraint introduced. +
  • +
+

Examples

+

This function is not meant to be called directly.

+

See also

+

cowboy_constraints(3), cowboy_constraints:nonempty(3), cowboy_router(3), cowboy_req:match_cookies(3), cowboy_req:match_qs(3)

+ + + + + + +
+ +
+ + +

+ Cowboy + 2.11 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +

Like my work? Donate!

+

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

+
+ + + + + + + + + +

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.

+ + + +
+
+
+
+ + + + + + + + + -- cgit v1.2.3