use-go-value 0.0.1

Go-like primitive value metadata for RustUse
Documentation
  • Coverage
  • 51.28%
    20 out of 39 items documented1 out of 20 items with examples
  • Size
  • Source code size: 11.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 818.52 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-go
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-go-value

Go-like primitive value metadata for RustUse.

Experimental

use-go-value is experimental while use-go remains below 0.3.0.

Example

use use_go_value::{GoPrimitiveValue, GoRuneLiteral};

let zero = GoPrimitiveValue::Int(String::from("0"));
let rune = GoPrimitiveValue::Rune(GoRuneLiteral::new('g').as_char());

assert_eq!(zero.type_name(), "int");
assert!(zero.is_zero_like());
assert_eq!(rune.type_name(), "rune");
# Ok::<(), core::convert::Infallible>(())

Scope

  • Primitive Go-like literal value metadata.
  • Numeric, string, rune, bool, and nil labels.
  • Simple helper methods for metadata-oriented checks.

Non-goals

  • Full Go runtime semantics.
  • Interpreting, evaluating, or type-checking values.
  • Arbitrary precision math.
  • Go source-code parsing.

License

Licensed under either Apache-2.0 or MIT.