You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking at #1746, and I realized that we've made it so the builder takes its arguments as part of the .build method rather than as part of the constructor. This means we have an API like this:
Instead in Rust it's more common to have the builder constructor take the arguments, for example like with ContextBuilder::from_waker. Adapted to our builder that would change the API to:
The only caveat is that build_from_bytes takes a &[u8]. With the current approach we don't have to handle ref's lfetimes explicitly. If we have it as an argument we would need to add a lifetime generic to the builder.
Activity
jprendes commentedon Aug 20, 2026
That sounds good.
The only caveat is that
build_from_bytestakes a &[u8]. With the current approach we don't have to handle ref's lfetimes explicitly. If we have it as an argument we would need to add a lifetime generic to the builder.jprendes commentedon Aug 20, 2026
Ok, I can change the internal API to take a
Vec<u8>instead of a&[u8]without any penalty (we were converting the&[u8]to aVec<u8>later on anyway)yoshuawuyts commentedon Aug 27, 2026
Closed by #1760.