rust

package
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTestFile

func IsTestFile(filePath string) bool

IsTestFile reports whether the given Rust path is a test file.

func IsTestFileWithContent

func IsTestFileWithContent(filePath string, contentReader vcs.ContentReader) bool

IsTestFileWithContent reports whether the given Rust path is a test file, using file content when available to confirm.

func ResolveRustProjectImports

func ResolveRustProjectImports(
	absPath string,
	filePath string,
	suppliedFiles map[string]bool,
	contentReader vcs.ContentReader,
) ([]string, error)

Types

type Module

type Module struct{}

func (Module) Extensions

func (Module) Extensions() []string

func (Module) IsTestFile

func (Module) IsTestFile(filePath string, contentReader vcs.ContentReader) bool

func (Module) Maturity

func (Module) Maturity() langsupport.MaturityLevel

func (Module) Name

func (Module) Name() string

func (Module) NewResolver

func (Module) NewResolver(ctx *langsupport.Context, contentReader vcs.ContentReader) langsupport.Resolver

type RustImport

type RustImport struct {
	Path string
	Kind RustImportKind
}

RustImport represents a Rust import statement or module declaration.

func ParseRustImports

func ParseRustImports(sourceCode []byte) ([]RustImport, error)

ParseRustImports parses Rust source code and extracts imports.

func RustImports

func RustImports(filePath string) ([]RustImport, error)

RustImports parses a Rust file and returns its imports.

type RustImportKind

type RustImportKind int

RustImportKind describes the type of Rust import-like declaration.

const (
	RustImportUse RustImportKind = iota
	RustImportExternCrate
	RustImportModDecl
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL