pub struct PulseClient { /* private fields */ }Expand description
A connected pulse client. Pick exactly one tier per connection.
Implementations§
Source§impl PulseClient
impl PulseClient
Sourcepub fn builder(endpoint: impl Into<String>) -> PulseClientBuilder
pub fn builder(endpoint: impl Into<String>) -> PulseClientBuilder
Creates a verified-TLS client builder for host:port.
Sourcepub async fn connect(endpoint: impl Into<String>) -> Result<Self>
pub async fn connect(endpoint: impl Into<String>) -> Result<Self>
Resolves host:port, uses the host as TLS SNI, verifies the certificate
against native system roots, and negotiates QUIC ALPN pulse.
Sourcepub async fn connect_with_token(
endpoint: impl Into<String>,
token: impl Into<String>,
) -> Result<Self>
pub async fn connect_with_token( endpoint: impl Into<String>, token: impl Into<String>, ) -> Result<Self>
Verified-TLS connection that sends token only after the certificate
and hostname handshake succeeds.
Sourcepub async fn dangerous_connect_insecure_local_dev(
addr: SocketAddr,
) -> Result<Self>
pub async fn dangerous_connect_insecure_local_dev( addr: SocketAddr, ) -> Result<Self>
Connects without certificate verification for an in-process/local test server. The address must be loopback; a public address is rejected before any packet or bearer token is sent.
Sourcepub async fn dangerous_connect_insecure_local_dev_with_token(
addr: SocketAddr,
token: impl Into<String>,
) -> Result<Self>
pub async fn dangerous_connect_insecure_local_dev_with_token( addr: SocketAddr, token: impl Into<String>, ) -> Result<Self>
Token-bearing counterpart to
PulseClient::dangerous_connect_insecure_local_dev. This remains
loopback-only and is intended solely for local auth integration tests.
Sourcepub async fn subscribe_sig_first(self, filter: &Filter) -> Result<SigFirstSub>
pub async fn subscribe_sig_first(self, filter: &Filter) -> Result<SigFirstSub>
Subscribes to the sig-first DATAGRAM tier. Yields SigFirstItem
per transaction, lowest latency. Enrichment fields are a full-tx-only
concept and are deliberately absent from this API.
Sourcepub async fn subscribe_full(
self,
filter: &Filter,
fields: &[&str],
) -> Result<FullSub>
pub async fn subscribe_full( self, filter: &Filter, fields: &[&str], ) -> Result<FullSub>
Subscribes to the full-tx tier. Yields decoded Frame::Tx values
in stream order (heartbeats and unknown frame types are
filtered out by FullSub::next itself — see its doc comment).
fields requests enrichment groups (currently just ["alt"], which
adds each frame’s ALT-loaded addresses).
The stream’s 6-byte preamble is read and verified before the
subscription is returned. A mismatch returns Error::BadPreamble.