RDF.ex v0.7.0 RDF.Serialization.Decoder behaviour View Source
A behaviour for decoders of strings encoded in a specific RDF.Serialization
format.
Link to this section Summary
Callbacks
Decodes a serialized RDF.Graph
or RDF.Dataset
from the given string.
Decodes a serialized RDF.Graph
or RDF.Dataset
from the given string.
Link to this section Callbacks
Link to this callback
decode(arg1, keyword)
View Sourcedecode(String.t(), keyword()) :: {:ok, RDF.Graph.t() | RDF.Dataset.t()} | {:error, any()}
Decodes a serialized RDF.Graph
or RDF.Dataset
from the given string.
It returns an {:ok, data}
tuple, with data
being the deserialized graph or
dataset, or {:error, reason}
if an error occurs.
Link to this callback
decode!(arg1, keyword)
View Sourcedecode!(String.t(), keyword()) :: RDF.Graph.t() | RDF.Dataset.t()
Decodes a serialized RDF.Graph
or RDF.Dataset
from the given string.
As opposed to decode
, it raises an exception if an error occurs.
Note: The __using__
macro automatically provides an overridable default
implementation based on the non-bang decode
function.