Binding

com.thoughtworks.binding.Binding$
See theBinding companion trait
object Binding extends Companion

Attributes

Authors:

杨博 (Yang Bo) <[email protected]>

Companion:
trait
Source:
Binding.scala
Graph
Supertypes
trait Companion
class Object
trait Matchable
class Any
Self type
Binding.type

Members list

Concise view

Type class instance

object BindingInstances extends BindingInstances2Or3

Monad instances for Binding.

Monad instances for Binding.

Attributes

Deprecated
true
Source:
Binding.scala
Graph
Supertypes
trait BindingInstances2Or3
class Object
trait Matchable
class Any
Self type

Binding Expressions

AST nodes of binding expressions

object BindingSeq

The companion of a data binding expression of a sequence

The companion of a data binding expression of a sequence

Attributes

Companion:
trait
Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait BindingSeq[+A] extends Watchable[A] with BindingSeq2Or3[A]

Data binding expression of a sequence

Data binding expression of a sequence

Attributes

Companion:
object
Source:
Binding.scala
Graph
Supertypes
trait BindingSeq2Or3[A]
trait BindingSeqOrWithFilter[A]
trait Watchable[A]
class Object
trait Matchable
class Any
Known subtypes
class FlatMap[A, B]
class MapBinding[A, B]
class Constants[A]
class Vars[A]
final case class Constant[+A](value: A) extends Stable[A]

A data binding expression that never changes.

A data binding expression that never changes.

Attributes

Source:
Binding.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Stable[A]
trait Binding[A]
trait Watchable[A]
class Object
trait Matchable
class Any
final class Constants[+A] extends BindingSeq[A]

An data binding expression of sequence that never changes.

An data binding expression of sequence that never changes.

Attributes

Companion:
object
Source:
Binding.scala
Graph
Supertypes
trait BindingSeq[A]
trait BindingSeq2Or3[A]
trait BindingSeqOrWithFilter[A]
trait Watchable[A]
class Object
trait Matchable
class Any
object Constants

Attributes

Companion:
class
Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class FlatMap[A, B](upstream: Binding[A], f: A => Binding[B]) extends Binding[B] with ChangedListener[B]

Attributes

Source:
Binding.scala
Graph
Supertypes
trait Binding[B]
trait Watchable[B]
class Object
trait Matchable
class Any
final class Map[A, B](upstream: Binding[A], f: A => B) extends Binding[B] with ChangedListener[A]

Attributes

Source:
Binding.scala
Graph
Supertypes
trait Binding[B]
trait Watchable[B]
class Object
trait Matchable
class Any
abstract class MultiMountPoint[-Element](upstream: BindingSeq[Element])

A mechanism that mounts the result of a data binding expression of a sequence into DOM or other system.

A mechanism that mounts the result of a data binding expression of a sequence into DOM or other system.

Attributes

Source:
Binding.scala
Graph
Supertypes
trait Binding[Unit]
class Object
trait Matchable
class Any
abstract class SingleMountPoint[-Value](upstream: Binding[Value])

A mechanism that mounts the result of a data binding expression of a single value into DOM or other system.

A mechanism that mounts the result of a data binding expression of a single value into DOM or other system.

Use this class only if you must override mount or unmount. If you only want to override set, you can use Binding[Unit] { onUpstreamChange(upstream.bind) } instead.

Attributes

Source:
Binding.scala
Graph
Supertypes
trait Binding[Unit]
class Object
trait Matchable
class Any
final case class SingletonBindingSeq[A](upstream: Binding[A]) extends BindingSeq[A]

A BindingSeq that contains only one element

A BindingSeq that contains only one element

Attributes

Source:
Binding.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait BindingSeq[A]
trait BindingSeq2Or3[A]
trait BindingSeqOrWithFilter[A]
trait Watchable[A]
class Object
trait Matchable
class Any
final class Var[A](var cache: A) extends Binding[A]

Source variable of data binding expression.

Source variable of data binding expression.

You can manually change the value:

import com.thoughtworks.binding.Binding.Var
val bindingVar = Var("initial value")
bindingVar.value = "changed value"

Then, any data binding expressions that depend on this Var will be changed automatically.

Attributes

Companion:
object
Source:
Binding.scala
Graph
Supertypes
trait Binding[A]
trait Watchable[A]
class Object
trait Matchable
class Any
object Var

Attributes

Companion:
class
Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Var.type
final class Vars[A] extends BindingSeq[A] with HasCache[A]

Source sequence of data binding expression.

Source sequence of data binding expression.

Attributes

Companion:
object
Source:
Binding.scala
Graph
Supertypes
trait HasCache[A]
trait BindingSeq[A]
trait BindingSeq2Or3[A]
trait BindingSeqOrWithFilter[A]
trait Watchable[A]
class Object
trait Matchable
class Any
object Vars

Attributes

Companion:
class
Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Vars.type

Type members

Classlikes

final class ChangedEvent[+Value](source: Binding[Value], val newValue: Value) extends EventObject

Attributes

Source:
Binding.scala
Graph
Supertypes
class EventObject
trait Serializable
class Object
trait Matchable
class Any
trait ChangedListener[-Value]

Attributes

Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FlatMap[A, B]
class Map[A, B]
final class PatchedEvent[+Element](source: BindingSeq[Element], val from: Int, val that: SeqOpsIterable[Element], val replaced: Int) extends EventObject

Attributes

Source:
Binding.scala
Graph
Supertypes
class EventObject
trait Serializable
class Object
trait Matchable
class Any
trait PatchedListener[-Element]

Attributes

Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
object Rx

Reactive operators for Observables.

Reactive operators for Observables.

Attributes

See also:
Note:

Rx operators are incomplete. Feel free to create a Pull Request if you need a certain operator.

Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rx.type
trait Stable[+A] extends Binding[A]

A data binding expression that has a stable referecence of value.

A data binding expression that has a stable referecence of value.

Attributes

Note:

Even though value always references to the same object, the content of the object could be mutable.

Source:
Binding.scala
Graph
Supertypes
trait Binding[A]
trait Watchable[A]
class Object
trait Matchable
class Any
Known subtypes
class Constant[A]
sealed trait Watchable[+A]

Attributes

Source:
Binding.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait BindingSeq[A]
class FlatMap[A, B]
class MapBinding[A, B]
class Constants[A]
class Vars[A]
trait Binding[A]
class FlatMap[A, B]
class Map[A, B]
trait Stable[A]
class Constant[A]
class Var[A]

Inherited classlikes

object Bind

Attributes

Inherited from:
Companion
Source:
Binding2Or3.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Inherited types

opaque type Bind[+A]

Attributes

Inherited from:
Companion
Source:
Binding2Or3.scala

Value members

Inherited methods

final def Bind[A](using dummyImplicit: DummyImplicit): Binding[A] =:= Bind[A]

Attributes

Inherited from:
Companion
Source:
Binding2Or3.scala
inline def apply[A](inline a: A): Binding[A]

Attributes

Inherited from:
Companion
Source:
Binding2Or3.scala

Givens

Inherited givens

Attributes

Inherited from:
Companion
Source:
Binding2Or3.scala

Extensions

Inherited extensions

extension [A](binding: Binding[A])
transparent inline def bind: A

Returns the current value of this Binding and marks the current @dom method depend on this Binding.

Returns the current value of this Binding and marks the current @dom method depend on this Binding.

Each time the value changes, in the current @dom method, all code after the current bind expression will be re-evaluated if the current @dom method is watching. However, code in current @dom method and before the current bind expression will not be re-evaluated. The above rule is not applied to DOM nodes created by XHTML literal. A bind expression under a DOM node does not affect siblings and parents of that node.

Attributes

Note:

This method must be invoked inside a @dom method body or a Binding { ... } block..

Inherited from:
Companion
Source:
Binding2Or3.scala