Skip to content

Commit

Permalink
Implement Sync and Send traits for QUIC structures
Browse files Browse the repository at this point in the history
  • Loading branch information
masa-koz committed Jan 1, 2025
1 parent ae897bd commit 6c38949
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1262,26 +1262,36 @@ pub struct Api {
pub struct Registration {
handle: Handle,
}
unsafe impl Sync for Registration {}
unsafe impl Send for Registration {}

/// Specifies how to configure a connection.
pub struct Configuration {
handle: Handle,
}
unsafe impl Sync for Configuration {}
unsafe impl Send for Configuration {}

/// A single QUIC connection.
pub struct Connection {
handle: Handle,
}
unsafe impl Sync for Connection {}
unsafe impl Send for Connection {}

/// A single server listener
pub struct Listener {
handle: Handle,
}
unsafe impl Sync for Listener {}
unsafe impl Send for Listener {}

/// A single QUIC stream on a parent connection.
pub struct Stream {
handle: Handle,
}
unsafe impl Sync for Stream {}
unsafe impl Send for Stream {}

impl From<&str> for Buffer {
fn from(data: &str) -> Buffer {
Expand Down

0 comments on commit 6c38949

Please sign in to comment.