Cyanide v0.5.1 Cyanide.Encoder protocol View Source

Cyanide.Encoder protocol defines Bson encoding according to Elxir terms and some Bson predefined structs (see Bson).

List of the protocol implementations:

  • Map - Encodes a map into a document
  • HasDict - Encodes a HashDict into a document
  • Keyword - Encodes a Keyword into a document
  • List - Encodes a list of key-alue pairs into a document otherwize encode list into array
  • Integer - Encodes integer in 32 or 64 bits
  • Float - Encodes float in 64 bits
  • Atom - Encodes special atom (false, true, nil, :nan, :+inf, :-inf, MIN_KEY and MAX_KEY) in appropriate format others in special type Symbol
  • BitString - as binary string
  • Bson.Regex' - see specs *Bson.ObjectId' - see specs Bson.JS' - see specs *Bson.Bin' - see specs `Bson.Timestamp ' - see specs

Link to this section Summary

Functions

Returns a binary representing a term in Bson format

Link to this section Types

Link to this section Functions

Returns a binary representing a term in Bson format