Skip to main content

Crate webtrans_trait

Crate webtrans_trait 

Source
Expand description

Transport-agnostic traits for WebTransport sessions and streams.

This crate defines the core trait contracts shared by native and WASM backends, including error mapping, stream operations, and datagram support.

Traitsยง

Error
Error trait for WebTransport operations.
MaybeSend
A trait that is Send on native targets and a no-op on WASM.
MaybeSync
A trait that is Sync on native targets and a no-op on WASM.
RecvStream
An incoming stream of bytes from the peer.
SendStream
An outgoing stream of bytes to the peer.
Session
A WebTransport session that can accept/create streams and send/receive datagrams.