gleamgen/module
Types
pub type Decorator {
ExternalErlang
ExternalJavascript
Deprecated(String)
Internal
}
Constructors
-
ExternalErlang -
ExternalJavascript -
Deprecated(String) -
Internal
pub type Definable {
Function(function.Function(Unchecked, Unchecked))
CustomType(custom.CustomType(Unchecked, Nil, Nil))
Constant(Expression(Unchecked))
}
Constructors
-
Function(function.Function(Unchecked, Unchecked)) -
CustomType(custom.CustomType(Unchecked, Nil, Nil)) -
Constant(Expression(Unchecked))
pub type Definition {
Definition(attributes: DefinitionAttributes, value: Definable)
}
Constructors
-
Definition(attributes: DefinitionAttributes, value: Definable)
pub type DefinitionAttributes {
DefinitionAttributes(
name: String,
is_public: Bool,
decorators: List(Decorator),
)
}
Constructors
-
DefinitionAttributes( name: String, is_public: Bool, decorators: List(Decorator), )
Functions
pub fn render_function(
func: Function(Unchecked, Unchecked),
context: Context,
name: String,
) -> Rendered
pub fn render_imported_module(module: ImportedModule) -> Rendered
pub fn with_constant(
attributes: DefinitionAttributes,
value: Expression(a),
handler: fn(Expression(a)) -> Module,
) -> Module
pub fn with_custom_type2(
attributes: DefinitionAttributes,
type_: CustomType(a, #(#(#(), b), c), d),
handler: fn(
GeneratedType(a),
Construtor(a, b),
Construtor(a, c),
) -> Module,
) -> Module
pub fn with_custom_type_unchecked(
attributes: DefinitionAttributes,
type_: CustomType(a, Unchecked, b),
handler: fn(GeneratedType(a), List(Construtor(a, Unchecked))) ->
Module,
) -> Module
pub fn with_function(
attributes: DefinitionAttributes,
func: Function(a, b),
handler: fn(Expression(a)) -> Module,
) -> Module
pub fn with_import(
module: ImportedModule,
handler: fn(ImportedModule) -> Module,
) -> Module