atproto_sdl/lower/attrs
Attribute access helpers and the @attr(...) -> ast constraint-record
folds shared by the rest of lower/*. Unrecognized attribute names
fold away silently; shape mismatches (e.g. a string arg to @range)
do too, matching the lenient-fold approach of the sibling packages.
Values
pub fn array_bounds(
attrs: List(tree.Attr),
) -> #(option.Option(Int), option.Option(Int))
pub fn attr_string(
attrs: List(tree.Attr),
name: String,
) -> option.Option(String)
pub fn build_blob_constraints(
attrs: List(tree.Attr),
docs: option.Option(String),
) -> ast.BlobConstraints
pub fn build_boolean_constraints(
attrs: List(tree.Attr),
docs: option.Option(String),
sugar_default: option.Option(tree.AttrValue),
) -> ast.BooleanConstraints
pub fn build_bytes_constraints(
attrs: List(tree.Attr),
docs: option.Option(String),
) -> ast.BytesConstraints
pub fn build_integer_constraints(
attrs: List(tree.Attr),
docs: option.Option(String),
sugar_default: option.Option(tree.AttrValue),
) -> ast.IntegerConstraints
pub fn build_string_constraints(
attrs: List(tree.Attr),
docs: option.Option(String),
sugar_default: option.Option(tree.AttrValue),
format_override: option.Option(ast.StringFormat),
) -> ast.StringConstraints
pub fn find_attr(
attrs: List(tree.Attr),
name: String,
) -> option.Option(tree.Attr)
pub fn int_list(args: List(tree.AttrArg)) -> List(Int)
pub fn int_pair(
args: List(tree.AttrArg),
) -> #(option.Option(Int), option.Option(Int))
pub fn single_int(args: List(tree.AttrArg)) -> option.Option(Int)
pub fn string_format_from_raw(raw: String) -> ast.StringFormat
pub fn string_list(args: List(tree.AttrArg)) -> List(String)