Implicit conversion from any function that produces a type that in turn has
an implicit conversion to a String, to a StringFunc.
Implicit conversion from any function that produces a type that in turn has
an implicit conversion to a String, to a StringFunc. In particular,
this means that if a given method takes a StringFunc as a parameter, it
can accept either a function that returns a String and a function that
returns any other type that has an implicit conversion to String in
scope.
Implicit conversion from any type that in turn has an implicit conversion
to a String, to a StringFunc.
Implicit conversion from any type that in turn has an implicit conversion
to a String, to a StringFunc. In particular, this means that if a given
method takes a StringFunc as a parameter, it can accept either a String
and any type that has an implicit conversion to String in scope.
Provides implicit conversions to the
StringFunctrait. This allows using aStringas a natural part of APIs that want to allow the flexibility of a()=>Stringwithout having to write overloads for all methods that should accept both.Lift's Menu API, for example, allows CSS classes to be defined either as a
Stringor a()=>String. The latter could use the current request and session state to do more interesting things than a hard-codedStringwould, while the former is simpler to use.