View Source Exonerate.Formats.Iri (exonerate v1.1.3)

Module which provides a macro that generates special code for an iri filter. This is an absolute uri with internationalization support.

If you require a relative uri, use Exonerate.Formats.IriReference.

the format is governed by appendix A of RFC 3986, as modified by section 2.2 of RFC 3987:

https://www.rfc-editor.org/rfc/rfc3986.txt https://www.rfc-editor.org/rfc/rfc3987.txt

Link to this section Summary

Functions

Creates a NimbleParsec parser ~iri/1.

Link to this section Functions

Link to this macro

filter(opts \\ [])

View Source (macro)

Creates a NimbleParsec parser ~iri/1.

This function returns {:ok, ...} if the passed string is a valid iri, or {:error, reason, ...} if it is not. See NimbleParsec for more information on the return tuples.

The function will only be created once per module, and it is safe to call the macro more than once.

options

Options:

  • :name (atom): the name of the function to create. Defaults to :"~iri"