trevrpc/metadata

Request and response metadata: headers and trailers, by lower-case name. Values are bytes; names ending in -bin hold binary values, the others text.

Types

Metadata names and their values.

pub type Metadata =
  dict.Dict(String, BitArray)

Values

pub fn from_list(
  entries: List(#(String, String)),
) -> dict.Dict(String, BitArray)

Metadata with text values.

pub fn get(
  metadata: dict.Dict(String, BitArray),
  name: String,
) -> Result(String, Nil)

A text value, if name has one that is UTF-8.

pub fn insert(
  metadata: dict.Dict(String, BitArray),
  name: String,
  value: String,
) -> dict.Dict(String, BitArray)

Sets a text value.

pub fn new() -> dict.Dict(String, BitArray)

No metadata.

✨ Search Document