RustQ.Meta.Options (rustq v1.0.0-rc.19)

Copy Markdown View Source

The options use RustQ.Meta accepts: :rust_sources, :provides, :rust_packages, :callable_modules, and :static_types.

Summary

Functions

The names of the options use RustQ.Meta accepts.

Returns rust_sources given as an expression, such as [@source], once the module body has evaluated it. Relative paths are relative to the working directory.

Validates and normalizes options passed to use RustQ.Meta.

Types

t()

@type t() :: %{
  optional(:provides) => [Path.t()],
  rust_sources: [Path.t()] | {:quoted, Macro.t()},
  rust_packages: [RustQ.Binding.Source.rust_package()],
  callable_modules: [module()],
  static_types: keyword(Macro.t())
}

Functions

option_names()

@spec option_names() :: [atom()]

The names of the options use RustQ.Meta accepts.

rust_source_paths!(value)

@spec rust_source_paths!(term()) :: [Path.t()]

Returns rust_sources given as an expression, such as [@source], once the module body has evaluated it. Relative paths are relative to the working directory.

validate!(opts, caller)

@spec validate!(
  keyword(),
  Macro.Env.t()
) :: t()

Validates and normalizes options passed to use RustQ.Meta.

validate_callable_modules(value, caller)

validate_provides(value, caller)

validate_rust_packages(value)

validate_rust_sources(value)

validate_static_types(value)