Contextual

org.typelevel.otel4s.context.Contextual
See theContextual companion object
trait Contextual[C]

Attributes

Companion
object
Source
Contextual.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

class ContextSyntax(ctx: C)

Attributes

Source
Contextual.scala
Supertypes
class Object
trait Matchable
class Any

Types

type Key[A] <: Key[A]

The type of Key used by contexts of type C.

The type of Key used by contexts of type C.

Attributes

Source
Contextual.scala

Value members

Abstract methods

def get[A](ctx: C)(key: Key[A]): Option[A]

Retrieves the value associated with the given key from the context, if such a value exists.

Retrieves the value associated with the given key from the context, if such a value exists.

Attributes

Source
Contextual.scala
def root: C

The root context, from which all other contexts are derived.

The root context, from which all other contexts are derived.

Attributes

Source
Contextual.scala
def updated[A](ctx: C)(key: Key[A], value: A): C

Creates a copy of this context with the given value associated with the given key.

Creates a copy of this context with the given value associated with the given key.

Attributes

Source
Contextual.scala

Concrete methods

def getOrElse[A](ctx: C)(key: Key[A], default: => A): A

Retrieves the value associated with the given key from the context, if such a value exists; otherwise, returns the provided default value.

Retrieves the value associated with the given key from the context, if such a value exists; otherwise, returns the provided default value.

Attributes

Source
Contextual.scala