cyanide v1.0.0 Cyanide View Source

Link to this section Summary

Link to this section Types

Link to this type

bson_map()

View Source
bson_map() :: %{optional(String.t()) => bson_type()}
Link to this type

bson_type()

View Source
bson_type() ::
  float()
  | String.t()
  | bson_map()
  | [bson_type()]
  | {integer(), binary()}
  | boolean()
  | nil
  | integer()
  | DateTime.t()
Link to this type

encodable_map()

View Source
encodable_map() :: %{optional(encodable_map_key()) => bson_type()}
Link to this type

encodable_map_key()

View Source
encodable_map_key() :: atom() | String.t()

Link to this section Functions

Link to this function

decode(document)

View Source
decode(binary()) :: {:ok, bson_map()} | {:error, :invalid_bson}
Link to this function

decode!(document)

View Source
decode!(binary()) :: bson_map()
Link to this function

encode(document)

View Source
encode(encodable_map()) :: {:ok, binary()} | {:error, :cannot_bson_encode}