given_FromExpr_String

io.github.iltotore.iron.macros.package$package.given_FromExpr_String
object given_FromExpr_String extends FromExpr[String]

A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.

 inline val x = "a"
 inline val y = "b"
 val z = "c"

 x + y //"ab"
 x + z //None
 z + x //None

Attributes

Source
package.scala
Graph
Supertypes
trait FromExpr[String]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def unapply(expr: Expr[String])(using Quotes): Option[String]

Return the value of the expression.

Return the value of the expression.

Returns None if the expression does not represent a value or possibly contains side effects. Otherwise returns the Some of the value.

Attributes

Source
package.scala