pub struct Client { /* private fields */ }Expand description
A MoQ client session builder.
Implementations§
Source§impl Client
impl Client
pub fn new() -> Self
pub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
pub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
Sourcepub fn with_stats(self, stats: StatsHandle) -> Self
pub fn with_stats(self, stats: StatsHandle) -> Self
Attach a tier-scoped StatsHandle. Per-broadcast and per-subscription
counters will be bumped through this handle for the lifetime of the session.
Pass StatsHandle::default (a no-op handle) to opt out.
Sourcepub fn with_origin(self, origin: OriginProducer) -> Self
pub fn with_origin(self, origin: OriginProducer) -> Self
Set both publish and consume from an OriginProducer.
This is equivalent to calling with_publish(origin.consume()) and with_consume(origin).
pub fn with_versions(self, versions: Versions) -> Self
Sourcepub fn with_path(self, path: impl Into<String>) -> Self
pub fn with_path(self, path: impl Into<String>) -> Self
Set the request path to advertise in the SETUP (moq-lite-05).
Required on transports that carry no request URI (native QUIC, qmux over
TCP/TLS/UDS) so the server learns which path the client wants. Omit it on
bindings that already carry a URI (WebTransport). Ignored by versions with no
Setup stream (moq-lite-01 through 04). The value is normalized to an absolute
path (empty becomes /, a leading / is prepended).