A client connected to a server: its id and the annotations the
server's middleware added to it.
Attributes#
| Attribute | Type | Description |
|---|---|---|
id | = id | |
annotations | Context[Any] = Context.empty() |
Functions#
__init__#
__init__(id) -> None| Parameter | Type | Description |
|---|---|---|
id | int |
def __init__(self, id: int) -> None:
self.id = id
self.annotations: Context[Any] = Context.empty()annotate#
annotate[A, T](tag, value) -> Self| Parameter | Type | Description |
|---|---|---|
tag | TagLike[A, T] | |
value | A |
Returns Self
def annotate[A, T](self, tag: TagLike[A, T], value: A) -> Self:
self.annotations = self.annotations.add(tag, value)
return self