RespError class

Implementation of a RESP error.

Inheritance

Constructors

RespError(String payload)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isArray bool
Return true if this type is an array.
no setterinherited
isBulkString bool
Return true if this type is a bulk string.
no setterinherited
isError bool
Return true if this type is an error.
no setteroverride
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 String
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.
inherited
toArray() RespArray
Converts this type to an array. Throws a StateError if this is not an array.
inherited
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.
override
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