pub struct StreamClient<P> { /* private fields */ }Expand description
Minimal provider-bound client.
Implementations§
Source§impl<P: StreamProvider> StreamClient<P>
impl<P: StreamProvider> StreamClient<P>
Sourcepub fn stream(&self, path: impl AsRef<str>) -> Result<Stream<P>, StreamError>
pub fn stream(&self, path: impl AsRef<str>) -> Result<Stream<P>, StreamError>
Opens one path handle after local validation.
Sourcepub async fn inspect_idempotency(
&self,
idempotency_key: IdempotencyKey,
) -> Result<Option<IdempotencyObservation>, StreamError>
pub async fn inspect_idempotency( &self, idempotency_key: IdempotencyKey, ) -> Result<Option<IdempotencyObservation>, StreamError>
Reads the retained terminal result for one caller-owned retry identity.
Sourcepub async fn children(
&self,
parent: Option<&str>,
limit: u32,
) -> Result<ChildStream, StreamError>
pub async fn children( &self, parent: Option<&str>, limit: u32, ) -> Result<ChildStream, StreamError>
Lists direct children from one fixed snapshot.
Sourcepub async fn commit(
&self,
request: CommitRequest,
) -> Result<CommitOutcome, StreamError>
pub async fn commit( &self, request: CommitRequest, ) -> Result<CommitOutcome, StreamError>
Executes a coordinated commit.
Sourcepub async fn commit_before(
&self,
request: CommitRequest,
deadline_unix_millis: u64,
) -> Result<CommitOutcome, StreamError>
pub async fn commit_before( &self, request: CommitRequest, deadline_unix_millis: u64, ) -> Result<CommitOutcome, StreamError>
Executes one coordinated commit under the provider’s trusted deadline.
Sourcepub async fn read_commit(
&self,
commit_id: CommitId,
) -> Result<CommittedEnvelope, StreamError>
pub async fn read_commit( &self, commit_id: CommitId, ) -> Result<CommittedEnvelope, StreamError>
Reads a committed envelope.
Source§impl StreamClient<Client>
impl StreamClient<Client>
Sourcepub async fn connect(
endpoint: impl AsRef<str>,
bearer_token: impl AsRef<str>,
) -> Result<Self, ConnectError>
pub async fn connect( endpoint: impl AsRef<str>, bearer_token: impl AsRef<str>, ) -> Result<Self, ConnectError>
Connects the high-level API to an authenticated managed or customer-hosted endpoint.
Sourcepub async fn connect_with_ca_certificate(
endpoint: impl AsRef<str>,
bearer_token: impl AsRef<str>,
certificate_pem: impl AsRef<[u8]>,
) -> Result<Self, ConnectError>
pub async fn connect_with_ca_certificate( endpoint: impl AsRef<str>, bearer_token: impl AsRef<str>, certificate_pem: impl AsRef<[u8]>, ) -> Result<Self, ConnectError>
Connects the high-level API through ambient roots plus one caller-supplied private CA.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for StreamClient<P>
impl<P> RefUnwindSafe for StreamClient<P>where
Arc<P>: RefUnwindSafe,
impl<P> Send for StreamClient<P>
impl<P> Sync for StreamClient<P>
impl<P> Unpin for StreamClient<P>
impl<P> UnsafeUnpin for StreamClient<P>where
Arc<P>: UnsafeUnpin,
impl<P> UnwindSafe for StreamClient<P>where
Arc<P>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request