com.phasmidsoftware.gryphon.parse.Parseable.ParseableUnit
See theParseableUnit companion object
trait ParseableUnit extends Parseable[Unit]
A trait that provides a specific implementation of the Parseable typeclass for the Unit type.
This implementation of Parseable for Unit treats any input string as a valid parseable input and always returns Some(()), regardless of the content of the input string. Parsing inherently succeeds for this type since Unit carries no meaningful information.
This trait can be used wherever Parseable[Unit] is required to signify that parsing is always successful and does not depend on the input string.
This typeclass is defined as a trait, allowing it to be mixed into other components or implemented as an object.
Extends:
Parseable[Unit]: Defines the generic contract for parsing a string into aUnitvalue.
Methods:
parse(w: String): Option[Unit]: Always returnsSome(()), ignoring the input string.
Use this implementation in contexts where parsing behavior is trivial and the result is guaranteed.
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
object ParseableUnit
Members list
In this article