RDF.ex v0.6.0 RDF.Serialization.Encoder behaviour View Source
A behaviour for encoders of RDF.Graphs or RDF.Datasets in a specific
RDF.Serialization format.
Link to this section Summary
Link to this section Callbacks
Link to this callback
encode(arg1, keyword)
View Source
encode(arg1, keyword)
View Source
encode(RDF.Graph.t() | RDF.Dataset.t(), keyword()) :: keyword(String.t())
encode(RDF.Graph.t() | RDF.Dataset.t(), keyword()) :: keyword(String.t())
Encodes a RDF.Graph or RDF.Dataset.
It returns an {:ok, string} tuple, with string being the serialized
RDF.Graph or RDF.Dataset, or {:error, reason} if an error occurs.
Link to this callback
encode!(arg1, keyword)
View Source
encode!(arg1, keyword)
View Source
encode!(RDF.Graph.t() | RDF.Dataset.t(), keyword()) :: String.t()
encode!(RDF.Graph.t() | RDF.Dataset.t(), keyword()) :: String.t()
Encodes a RDF.Graph or RDF.Dataset.
As opposed to encode, it raises an exception if an error occurs.
Note: The __using__ macro automatically provides an overridable default
implementation based on the non-bang encode function.