RDF.Graph.fetch

You're seeing just the function fetch, go back to RDF.Graph module for more information.

Specs

fetch(t(), RDF.Star.Statement.coercible_subject()) ::
  {:ok, RDF.Description.t()} | :error

Fetches the description of the given subject.

When the subject can not be found :error is returned.

Examples

iex> RDF.Graph.new([{EX.S1, EX.P1, EX.O1}, {EX.S2, EX.P2, EX.O2}])
...> |> RDF.Graph.fetch(EX.S1)
{:ok, RDF.Description.new(EX.S1, init: {EX.P1, EX.O1})}
iex> RDF.Graph.new() |> RDF.Graph.fetch(EX.foo)
:error