class Matter::Schema::BitmapSchema(T)

Overview

BitmapSchema provides encoding and decoding for bitmaps with named fields at specific bit positions

Defined in:

matter/schema/bitmap_schema.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(fields : Hash(String, BitFlag | BitField)) #

[View source]

Instance Method Detail

def decode(bitmap : Int32 | Int64) : Hash(String, Bool | Int32) #

Decode an integer bitmap to a named hash of field values


[View source]
def encode(values : Hash(String, Bool | Int32 | Int64)) : Int64 #

Encode a named hash of field values to an integer bitmap


[View source]