ContextSyntax

org.typelevel.otel4s.context.Contextual.ContextSyntax
class ContextSyntax(ctx: C)

Attributes

Source
Contextual.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def get[A](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 getOrElse[A](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
def updated[A](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