Cyanide (cyanide v1.0.1) View Source

Link to this section Summary

Link to this section Types

Specs

bson_map() :: %{optional(String.t()) => bson_type()}

Specs

bson_type() ::
  float()
  | String.t()
  | bson_map()
  | [bson_type()]
  | {integer(), binary()}
  | boolean()
  | nil
  | integer()
  | DateTime.t()

Specs

encodable_map() :: %{required(encodable_map_key()) => bson_type()}

Specs

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

Link to this section Functions

Specs

decode(binary()) :: {:ok, bson_map()} | {:error, :invalid_bson}

Specs

decode!(binary()) :: bson_map()

Specs

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

Specs

encode!(encodable_map()) :: binary()