Skip to main content

Crate specta_go

Crate specta_go 

Source
Expand description

Go language exporter for Specta.

This crate is still in active development and is not yet ready for general purpose use!

§Usage

use specta::Types;
use specta_go::Go;

#[derive(specta::Type)]
pub struct MyType {
    pub field: String,
}

let types = Types::default().register::<MyType>();

Go::default()
    .export_to("./bindings.go", &types, specta_serde::Format)
    .unwrap();

Structs§

Go
Go language exporter.

Enums§

Error
Errors that can occur during Go code generation.
Layout
Allows configuring the format of the final file.