rust

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRustCargofile

func GenerateRustCargofile(schema *scalefile.Schema, parsedSignatureDependency *ParsedDependency, functionPath string) ([]byte, error)

func GenerateRustLib

func GenerateRustLib(packageSchema *scalefile.Schema) ([]byte, error)

Types

type Cargo

type Cargo struct {
	CargoFeatures     interface{}            `toml:"cargo-features,omitempty"`
	Package           interface{}            `toml:"package,omitempty"`
	Lib               interface{}            `toml:"lib,omitempty"`
	Bin               interface{}            `toml:"bin,omitempty"`
	Example           interface{}            `toml:"example,omitempty"`
	Test              interface{}            `toml:"test,omitempty"`
	Bench             interface{}            `toml:"bench,omitempty"`
	Dependencies      map[string]interface{} `toml:"dependencies,omitempty"`
	DevDependencies   interface{}            `toml:"dev-dependencies,omitempty"`
	BuildDependencies interface{}            `toml:"build-dependencies,omitempty"`
	Target            interface{}            `toml:"target,omitempty"`
	Badges            interface{}            `toml:"badges,omitempty"`
	Features          interface{}            `toml:"features,omitempty"`
	Patch             interface{}            `toml:"patch,omitempty"`
	Replace           interface{}            `toml:"replace,omitempty"`
	Profile           interface{}            `toml:"profile,omitempty"`
	Workspace         interface{}            `toml:"workspace,omitempty"`
}

type DependencyPath

type DependencyPath struct {
	Path    string `toml:"path"`
	Package string `toml:"package"`
}

type DependencyVersion

type DependencyVersion struct {
	Version  string `toml:"version"`
	Package  string `toml:"package"`
	Registry string `toml:"registry"`
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func New

func New() *Generator

func (*Generator) GenerateRustCargofile

func (g *Generator) GenerateRustCargofile(packageSchema *scalefile.Schema, parsedSignatureDependency *ParsedDependency, functionPath string) ([]byte, error)

func (*Generator) GenerateRustLib

func (g *Generator) GenerateRustLib(packageSchema *scalefile.Schema) ([]byte, error)

type Manifest

type Manifest struct {
	// contains filtered or unexported fields
}

func ParseManifest

func ParseManifest(data []byte) (*Manifest, error)

func (*Manifest) AddDependencyWithPath

func (m *Manifest) AddDependencyWithPath(dependency string, path DependencyPath) error

func (*Manifest) AddDependencyWithVersion

func (m *Manifest) AddDependencyWithVersion(dependency string, version DependencyVersion) error

func (*Manifest) GetDependency

func (m *Manifest) GetDependency(dependency string) *ParsedDependency

func (*Manifest) HasDependency

func (m *Manifest) HasDependency(dependency string) bool

func (*Manifest) RemoveDependency

func (m *Manifest) RemoveDependency(dependency string) error

func (*Manifest) Write

func (m *Manifest) Write() ([]byte, error)

type ParsedDependency

type ParsedDependency struct {
	Version  string `toml:"version,omitempty"`
	Package  string `toml:"package,omitempty"`
	Registry string `toml:"registry,omitempty"`
	Path     string `toml:"path,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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