Expand description
§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");§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.
Structs§
- GoBool
Literal - Go bool literal metadata.
- GoNil
- Go nil metadata.
- GoRune
Literal - Go rune literal metadata.
Enums§
- GoNumeric
Value - Primitive numeric Go-like value metadata.
- GoPrimitive
Value - Primitive Go-like value metadata.
- GoString
Literal Kind - Go string literal kind metadata.
- GoValue
Parse Error - Error returned when parsing Go value vocabulary fails.