Skip to content
Discussion options

You must be logged in to vote

The builders of the client and server from h3 have a generic argument:

h3/h3/src/client/builder.rs

Lines 115 to 122 in 94cb13f

pub async fn build<C, O, B>(
&mut self,
quic: C,
) -> Result<(Connection<C, B>, SendRequest<O, B>), ConnectionError>
where
C: quic::Connection<B, OpenStreams = O>,
O: quic::OpenStreams<B>,
B: Buf,

h3/h3/src/server/builder.rs

Lines 126 to 129 in 94cb13f

pub async fn build<C, B>(&self, conn: C) -> Result<Connection<C, B>, ConnectionError>
where
C: quic::Connection<B>,
B: Buf,

They accept anything implementing the Connection trait and are used the same way.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@zR-JB
Comment options

Answer selected by seanmonstar
Comment options

You must be logged in to vote
1 reply
@Ruben2424
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants