RustQ.NativeRef (rustq v0.6.0)

Copy Markdown View Source

Reference to a Rust native item used by code generators.

A native ref names the Rust package plus a target/member pair, for example skia-safe::Canvas::draw_rect. Package is optional for local or caller-scoped references.

Summary

Functions

Formats a native reference as a Rust path.

Builds a native reference.

Types

t()

@type t() :: %RustQ.NativeRef{
  member: String.t(),
  package: String.t() | nil,
  target: String.t()
}

Functions

format(native_ref)

@spec format(t()) :: String.t()

Formats a native reference as a Rust path.

new(target, member, opts \\ [])

@spec new(String.t(), String.t(), keyword()) :: t()

Builds a native reference.