RustQ.Syn.Impl (rustq v1.0.0-rc.19)

Copy Markdown View Source

Rust impl block metadata, including target type, optional trait, doc comments, and methods.

trait_ast is the implemented trait's path, and negative marks an impl such as impl !Send for T. bounds pairs each of the impl's type_parameters with the traits bounding it, inline or in the where clause, named by the last segment of their path. types pairs each associated type the impl defines with its type, as in {"Target", [T]} for a Deref impl.

Summary

Types

t()

@type t() :: %RustQ.Syn.Impl{
  bounds: [{String.t(), [String.t()]}],
  docs: [String.t()],
  methods: [RustQ.Syn.Method.t()],
  negative: boolean(),
  source_line: pos_integer() | nil,
  source_path: Path.t() | nil,
  target: String.t(),
  target_ast: RustQ.Syn.type(),
  trait: String.t() | nil,
  trait_ast: RustQ.Syn.Type.Path.t() | nil,
  type_parameters: [String.t()],
  types: [{String.t(), RustQ.Syn.type()}]
}