Skip to main content

PulseClient

Struct PulseClient 

Source
pub struct PulseClient { /* private fields */ }
Expand description

A connected pulse client. Pick exactly one tier per connection.

Implementations§

Source§

impl PulseClient

Source

pub fn builder(endpoint: impl Into<String>) -> PulseClientBuilder

Creates a verified-TLS client builder for host:port.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more