facet_generate 0.16.0

Generate Swift, Kotlin and TypeScript from types annotated with `#[derive(Facet)]`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate as fg;

use facet::Facet;
use serde::Serialize;

#[derive(Facet, Serialize, Debug)]
#[facet(tag = "type", content = "content")]
#[repr(C)]
pub enum SomeEnum {
    /// The associated String contains some opaque context
    Context(#[facet(fg::serialized_as = "String")] SomeOtherType),
    Other(i32),
}

#[derive(Facet, Serialize, Debug)]
pub struct SomeOtherType;