Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Owned handle to flatbuffers to make passing around easier #2041

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

a10y
Copy link
Contributor

@a10y a10y commented Jan 21, 2025

Due to the way flatbuffers creates all table types with attached lifetimes, we have to always pass around a buffer + loc to read a flatbuffer type.

This PR adds some infra to make it easy to pass around Owned variants of all of our flatbuffer types, and feeds them into the IPC decoder and ArrayView constructor

Self: Sized;
}

macro_rules! make_owned {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a stripped-down macro inspired by https://docs.rs/flatbuffers-owned/latest/flatbuffers_owned/

@a10y a10y force-pushed the aduffy/owned-fb branch 2 times, most recently from 1390e26 to ed947ff Compare January 21, 2025 18:51
a10y added 5 commits January 21, 2025 20:21
Due to the way flatbuffers creates all table types with attached lifetimes, we have
to always pass around a buffer + loc to read a flatbuffer type.

This PR adds some infra to make it easy to pass around `Owned` variants of
all of our flatbuffer types, and feeds them into the IPC decoder and ArrayView constructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant