vtcode-macros
Procedural macros for VT Code.
vtcode-macros provides derive macros that eliminate boilerplate for common patterns in the VT Code codebase.
Derive macros
StringNewtype
Derive macro for tuple structs wrapping a single String field. Generates:
- Inherent methods:
new(),as_str(),into_inner() Deref<Target = str>Borrow<str>AsRef<str>DisplayFrom<String>,From<&str>,From<Self> for String
Usage
use StringNewtype;
use ;
;
let id = new;
assert_eq!;
assert_eq!;
let inner: String = id.into_inner;