@@ -17,6 +17,7 @@ use std::sync::Arc;
1717
1818/// A single open WebSocket connection. Control frames (ping/pong, close handshake)
1919/// are the implementation's own responsibility; only binary application frames cross here.
20+ #[ cfg_attr( feature = "uniffi" , uniffi:: export( with_foreign) ) ]
2021#[ async_trait:: async_trait]
2122pub trait WsConnection : Send + Sync + ' static {
2223 /// Send one binary application frame.
@@ -31,12 +32,14 @@ pub trait WsConnection: Send + Sync + 'static {
3132///
3233/// A record wrapper, not a bare `Arc<dyn WsConnection>`: uniffi 0.31 cannot
3334/// lift a trait object returned from an async `with_foreign` method.
35+ #[ cfg_attr( feature = "uniffi" , derive( uniffi:: Record ) ) ]
3436pub struct WsConnectResult {
3537 pub connection : Arc < dyn WsConnection > ,
3638}
3739
3840/// A host- or Rust-provided WebSocket transport. Opens the LiveKit signalling
3941/// WebSocket; knows nothing about LiveKit/protobuf.
42+ #[ cfg_attr( feature = "uniffi" , uniffi:: export( with_foreign) ) ]
4043#[ async_trait:: async_trait]
4144pub trait WsClient : Send + Sync {
4245 /// Open a WebSocket. `url` is the full ws(s):// URL including query string.
@@ -51,6 +54,7 @@ pub trait WsClient: Send + Sync {
5154}
5255
5356/// The HTTP method for an [`HttpClient::request`].
57+ #[ cfg_attr( feature = "uniffi" , derive( uniffi:: Enum ) ) ]
5458#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
5559pub enum HttpMethod {
5660 Get ,
@@ -64,6 +68,7 @@ pub enum HttpMethod {
6468/// Implementors provide the single [`request`](HttpClient::request) primitive;
6569/// [`HttpClientExt`] layers `get`/`post` on top, so adding verbs never widens the
6670/// implementation (or, for foreign impls, the FFI) surface.
71+ #[ cfg_attr( feature = "uniffi" , uniffi:: export( with_foreign) ) ]
6772#[ async_trait:: async_trait]
6873pub trait HttpClient : Send + Sync {
6974 /// Perform one HTTP request, sending `body` if present.
0 commit comments