MessageInput

io.github.pidoveproject.showdown.protocol.MessageInput
See theMessageInput companion object
case class MessageInput(raw: String, data: List[(Int, String)], cursor: Int, roomId: RoomId)

A message input.

Value parameters

cursor

the next part index to consume

data

the input separated in indexed parts

raw

the entire input as String

Attributes

Companion
object
Source
MessageInput.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def characterPosition: Either[ProtocolError, Int]

Get the character position of the cursor.

Get the character position of the cursor.

Attributes

Returns

the column position of the current part to read

Source
MessageInput.scala
def exhausted: Boolean

Check if this input is exhausted.

Check if this input is exhausted.

Attributes

Returns

true if the cursor is at the end of the input

Source
MessageInput.scala
def peek: Either[ProtocolError, String]

Get the next part.

Get the next part.

Attributes

Returns

the part at the cursor's index

Source
MessageInput.scala

Jump to the next part.

Jump to the next part.

Attributes

Returns

a new MessageInput pointing to the next part

Source
MessageInput.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product