Skip to content

Commit

Permalink
feat: errorspec at high level.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrubinos committed Mar 24, 2024
1 parent 6e08974 commit 55d507f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nbson.erl
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
%%%-----------------------------------------------------------------------------
-spec encode(Data) -> Result when
Data :: undefined | map_document() | proplist_document() | [document()],
Result :: {ok, BSON} | {error, term()},
Result :: {ok, BSON} | {error, encode_error_reason()},
BSON :: binary().
encode(Data) ->
nbson_encoder:encode(Data).

-spec decode(Data) -> Result when
Data :: binary(),
Result :: {ok, [document()]} | {error, term()}.
Result :: {ok, [document()]} | {error, decode_error_reason()}.
decode(Data) ->
nbson_decoder:decode(Data).

Expand Down

0 comments on commit 55d507f

Please sign in to comment.