pub struct Client<T> { /* private fields */ }Implementations§
Source§impl<T: RpcTransport> Client<T>
impl<T: RpcTransport> Client<T>
Sourcepub fn new(transport: T, implemented: impl IntoIterator<Item = String>) -> Self
pub fn new(transport: T, implemented: impl IntoIterator<Item = String>) -> Self
implemented is the authenticated endpoint’s advertised handler set, not ALL_METHODS or the proto’s maturity declarations.
Sourcepub fn with_protocol(self, protocol: ProtocolCompatibility) -> Self
pub fn with_protocol(self, protocol: ProtocolCompatibility) -> Self
Set support obtained from DescribeEndpoint on this authenticated endpoint. Discard the client on endpoint/connection replacement; never reuse support across peers. Missing support keeps all gated routes closed.
Sourcepub async fn call<M: UnaryRpc>(
&self,
request: &M::Request,
) -> Result<M::Response, ClientError<T::Error>>
pub async fn call<M: UnaryRpc>( &self, request: &M::Request, ) -> Result<M::Response, ClientError<T::Error>>
Transports the caller’s exact request and request PoP. For HYBRID imports, Prepare returns frozen fields/bounds; the browser completes and signs the delegation explicitly. Commit hosts use verify_prepared_delegation with their durable reservation; this generic client grants no import authority.
pub async fn observe<M: ServerStreamingRpc>( &self, request: &M::Request, ) -> Result<Messages<T::Reader, M::Response>, ClientError<T::Error>>
Auto Trait Implementations§
impl<T> Freeze for Client<T>where
T: Freeze,
impl<T> RefUnwindSafe for Client<T>where
T: RefUnwindSafe,
impl<T> Send for Client<T>where
T: Send,
impl<T> Sync for Client<T>where
T: Sync,
impl<T> Unpin for Client<T>where
T: Unpin,
impl<T> UnsafeUnpin for Client<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Client<T>where
T: 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