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 documentHasDict
- Encodes a HashDict into a documentKeyword
- Encodes a Keyword into a documentList
- Encodes a list of key-alue pairs into a document otherwize encode list into arrayInteger
- Encodes integer in 32 or 64 bitsFloat
- Encodes float in 64 bitsAtom
- Encodes special atom (false
,true
,nil
,:nan
,:+inf
,:-inf
,MIN_KEY
andMAX_KEY
) in appropriate format others in special type SymbolBitString
- as binary stringBson.Regex' - see specs *
Bson.ObjectId' - see specsBson.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 type
t()
View Source
t()
View Source
t() :: term()
t() :: term()
Link to this section Functions
Link to this function
encode(term) View Source
Returns a binary representing a term in Bson format