Predefined implicit implementations of Optionally and methods to create new Optionally
Attributes
- Companion
- trait
- Source
- Optionally.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Optionally.type
Members list
Value members
Concrete methods
Constructs an Optionally
from a set of functions corresponding to each of Optionally's methods
Constructs an Optionally
from a set of functions corresponding to each of Optionally's methods
Attributes
- Source
- Optionally.scala
An Optionally in which a present value is used as-is, and default
is used if the value is missing
An Optionally in which a present value is used as-is, and default
is used if the value is missing
Attributes
- Example
-
import name.rayrobdod.stringContextParserCombinator.Interpolator.idInterpolators given Optionally[Char, Char] = Optionally.whereDefault('A') val p = idInterpolators.charIn('0' to '9').optionally() p.interpolate(StringContext("5"), Nil) // '5': Char p.interpolate(StringContext(""), Nil) // 'A': Char
- Source
- Optionally.scala
Implicits
Implicits
The Unit
-handling Optionally; the result is a Unit
whether the value is present or not
The Unit
-handling Optionally; the result is a Unit
whether the value is present or not
import name.rayrobdod.stringContextParserCombinator.Interpolator.Interpolator
val p1:Interpolator[Unit] = ???
((p1:Interpolator[Unit]).optionally()):Interpolator[Unit]
Attributes
- Source
- Optionally.scala
Inherited implicits
The fallback Optionally
; wraps a present value in a Some
, and uses None
as the missing value
The fallback Optionally
; wraps a present value in a Some
, and uses None
as the missing value
import name.rayrobdod.stringContextParserCombinator.Interpolator.Interpolator
class A {}
val p1:Interpolator[A] = ???
((p1:Interpolator[A]).optionally()):Interpolator[Option[A]]
Attributes
- Inherited from:
- LowPrioOptionally (hidden)
- Source
- Optionally.scala