offstage/dynamic/spec
Types
Values
pub fn array_of(
values: List(a),
transformer: fn(a) -> Spec,
) -> Spec
Creates a Spec representing an array of transformed values.
pub fn none_if_empty(list: List(a)) -> option.Option(List(a))
Returns option.None if the list is empty, otherwise returns option.Some with the list.
pub fn nullable(
value: option.Option(a),
transformer: fn(a) -> Spec,
) -> Spec
Creates a Spec representing a nullable value.
pub fn object(properties: List(#(String, Spec))) -> Spec
Creates a Spec representing an object with the given properties.
pub fn object_of(
values: List(a),
transformer: fn(a) -> #(String, Spec),
) -> Spec
Creates a Spec representing an object with transformed properties.