struct Murcure::Protos::BanList::BanEntry

Included Modules

Defined in:

murcure/utils/protos.cr

Constant Summary

FIELDS = {1 => {name: :address, pb_type: :bytes, crystal_type: Slice(UInt8), cast_type: Slice(UInt8), native: true, optional: false, repeated: false, default: nil, packed: false}, 2 => {name: :mask, pb_type: :uint32, crystal_type: UInt32, cast_type: UInt32, native: true, optional: false, repeated: false, default: nil, packed: false}, 3 => {name: :name, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 4 => {name: :hash, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 5 => {name: :reason, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 6 => {name: :start, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 7 => {name: :duration, pb_type: :uint32, crystal_type: UInt32, cast_type: UInt32?, native: true, optional: true, repeated: false, default: nil, packed: false}} of Int32 => HashLiteral(Symbol, ASTNode)

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(address : Slice(UInt8), mask : UInt32, name : String | Nil = nil, hash : String | Nil = nil, reason : String | Nil = nil, start : String | Nil = nil, duration : UInt32 | Nil = nil) #

def self.new(buf : Protobuf::Buffer) #

Class Method Detail

def self.from_protobuf(io) #

Instance Method Detail

def [](key : String) #

def address : Slice(UInt8) #

def address=(address : Slice(UInt8)) #

def duration : UInt32 | Nil #

def duration=(duration : UInt32 | Nil) #

def hash : String | Nil #
Description copied from class Object

Generates an UInt64 hash value for this object.

This method must have the property that a == b implies a.hash == b.hash.

The hash value is used along with == by the Hash class to determine if two objects reference the same hash key.

Subclasses must not override this method. Instead, they must define hash(hasher), though usually the macro def_hash can be used to generate this method.


def hash=(hash : String | Nil) #

def mask : UInt32 #

def mask=(mask : UInt32) #

def name : String | Nil #

def name=(name : String | Nil) #

def reason : String | Nil #

def reason=(reason : String | Nil) #

def start : String | Nil #

def start=(start : String | Nil) #

def to_protobuf(io : IO, embedded = false) #

def to_protobuf #