struct Murcure::Protos::BanList::BanEntry
- Murcure::Protos::BanList::BanEntry
- Struct
- Value
- Object
Included Modules
- Protobuf::Message
Defined in:
murcure/utils/protos.crConstant 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
- .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)
- .new(buf : Protobuf::Buffer)
Class Method Summary
Instance Method Summary
- #[](key : String)
- #address : Slice(UInt8)
- #address=(address : Slice(UInt8))
- #duration : UInt32 | Nil
- #duration=(duration : UInt32 | Nil)
-
#hash : String | Nil
Generates an
UInt64
hash value for this object. - #hash=(hash : String | Nil)
- #mask : UInt32
- #mask=(mask : UInt32)
- #name : String | Nil
- #name=(name : String | Nil)
- #reason : String | Nil
- #reason=(reason : String | Nil)
- #start : String | Nil
- #start=(start : String | Nil)
- #to_protobuf(io : IO, embedded = false)
- #to_protobuf
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)
#
Class Method Detail
Instance Method Detail
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.