RespArray class

Implementation of a RESP array.

Inheritance

Constructors

RespArray(List<RespType>? payload)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isArray bool
Return true if this type is an array.
no setteroverride
isBulkString bool
Return true if this type is a bulk string.
no setterinherited
isError bool
Return true if this type is an error.
no setterinherited
isInteger bool
Return true if this type is an integer.
no setterinherited
isSimpleString bool
Return true if this type is a simple string.
no setterinherited
payload List<RespType>?
finalinherited
prefix String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeName String
The name of the concrete type.
no setteroverride

Methods

handleAs<T>({T simple(RespSimpleString)?, T bulk(RespBulkString)?, T integer(RespInteger)?, T array(RespArray)?, T error(RespError)?}) → T
Calls one of the given handlers based on the concrete type. Returns true if a handler for the concrete type was provided, otherwise false is returned. If the handler throws an error while executing, the error is raised to the caller of this method.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() List<int>
Serializes this type to RESP.
override
toArray() RespArray
Converts this type to an array. Throws a StateError if this is not an array.
override
toBulkString() RespBulkString
Converts this type to a bulk string. Throws a StateError if this is not a bulk string.
inherited
toError() RespError
Converts this type to an error. Throws a StateError if this is not an error.
inherited
toInteger() RespInteger
Converts this type to an integer. Throws a StateError if this is not an integer.
inherited
toSimpleString() RespSimpleString
Converts this type to a simple string. Throws a StateError if this is not a simple string.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

nullArray Uint8List
final