Skip to content

Seamless serialization of existing Rust structs #182

Description

@jmillan

Having an existing Rust struct which is also represented in the flatbuffers schema and thus in the autogenerated code.., is there any derive or traits we can implement in our struct so it can seamlessly serialize it into the builder, rather than having to manually convert from our struct to the one created by the autogenerated code?

Imagine a simple struct like:

struct DominantSpeakerNotification {
    producer_id: ProducerId,
}

Which has an analogous flatbuffers table which leads to the autogenerated code:

pub struct DominantSpeakerNotification {
    pub producer_id: ::planus::alloc::string::String,
}

Is there any derive or trait we could implement to serialize our DominantSpeakerNotification into the builder?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions