Module

Screeps.Id

Package
purescript-screeps-classy
Repository
purescript/purescript-screeps

#HasId Source

class HasId a  where

Members

#Id Source

newtype Id a

Constructors

Instances

#id Source

id :: forall a. HasId a => a -> Id a

Get a unique id of an object.

#getObjectById Source

getObjectById :: forall a. HasId a => Id a -> Either String a

Get the object from an Id, if it passes validation.

#unsafeGetObjectById Source

unsafeGetObjectById :: forall a. Id a -> Maybe a

#eqById Source

eqById :: forall a. HasId a => a -> a -> Boolean

#encodeJsonWithId Source

encodeJsonWithId :: forall a. HasId a => a -> Json

#decodeJsonWithId Source

decodeJsonWithId :: forall a. HasId a => Json -> Either String a