DefinableSetting

sbt.Scoped.DefinableSetting
sealed trait DefinableSetting[A1]

Mixin trait for adding convenience vocabulary associated with applying a setting to a configuration item.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait InputKey[A1]
class SettingKey[A1]
Self type

Members list

Value members

Abstract methods

def scopedKey: ScopedKey[A1]

Concrete methods

inline def <<=(app: Initialize[A1]): Setting[A1]
def ?: Initialize[Option[A1]]

A symbolic alias for option.

A symbolic alias for option.

Attributes

final def ??[A2 >: A1](or: => A2): Initialize[A2]
final def get(settings: Settings): Option[A1]

From the given Settings, extract the value bound to this key.

From the given Settings, extract the value bound to this key.

Attributes

final def getOrElse[A2 >: A1](or: => A2): Initialize[A2]

Like option, but with a call-by-name parameter rather than an existing Def.Initialize. Useful when you want to have a value computed when no value is bound to this key.

Like option, but with a call-by-name parameter rather than an existing Def.Initialize. Useful when you want to have a value computed when no value is bound to this key.

Value parameters

or

by-name expression evaluated when a value is needed.

Attributes

Returns

currently bound setting value, or the result of or if unbound.

def option: Initialize[Option[A1]]

Creates an Def.Initialize with value scala.None if there was no previous definition of this key, and scala.Some(value) if a definition exists. Useful for when you want to use the ''existence'' of one setting in order to define another setting.

Creates an Def.Initialize with value scala.None if there was no previous definition of this key, and scala.Some(value) if a definition exists. Useful for when you want to use the ''existence'' of one setting in order to define another setting.

Attributes

Returns

currently bound value wrapped in Initialize[Some[T]], or Initialize[None] if unbound.

infix def or[T >: A1](i: Initialize[T]): Initialize[T]

Creates an Def.Initialize with value bound to this key, or returns i parameter if unbound.

Creates an Def.Initialize with value bound to this key, or returns i parameter if unbound.

Value parameters

i

value to return if this setting doesn't have a value.

Attributes

Returns

currently bound setting value, or i if unbound.

inline def set(inline app: Initialize[A1]): Setting[A1]

In addition to creating Def.setting(...), this captures the source position.

In addition to creating Def.setting(...), this captures the source position.

Attributes

final def set0(app: Initialize[A1], source: SourcePosition): Setting[A1]

Internally used function for setting a value along with the .sbt file location where it is defined.

Internally used function for setting a value along with the .sbt file location where it is defined.

Attributes