pub struct GrpcCallBuilder<'a> { /* private fields */ }
Expand description
Builder for GrpcCall
.
Implementations§
Source§impl<'a> GrpcCallBuilder<'a>
impl<'a> GrpcCallBuilder<'a>
Sourcepub fn upstream<VALUE: Into<Upstream<'a>>>(self, value: VALUE) -> Self
pub fn upstream<VALUE: Into<Upstream<'a>>>(self, value: VALUE) -> Self
Upstream cluster to send the request to.
Sourcepub fn method<VALUE: Into<&'a str>>(self, value: VALUE) -> Self
pub fn method<VALUE: Into<&'a str>>(self, value: VALUE) -> Self
The GRPC service method to call.
Sourcepub fn initial_metadata<VALUE: Into<Vec<(&'a str, &'a [u8])>>>(
self,
value: VALUE,
) -> Self
pub fn initial_metadata<VALUE: Into<Vec<(&'a str, &'a [u8])>>>( self, value: VALUE, ) -> Self
Initial GRPC metadata to send with the request.
Sourcepub fn metadata<VALUE>(self, item: VALUE) -> Self
pub fn metadata<VALUE>(self, item: VALUE) -> Self
Initial GRPC metadata to send with the request.
Sourcepub fn message<VALUE: Into<&'a [u8]>>(self, value: VALUE) -> Self
pub fn message<VALUE: Into<&'a [u8]>>(self, value: VALUE) -> Self
An optional request body to send with the request.
Source§impl<'a> GrpcCallBuilder<'a>
impl<'a> GrpcCallBuilder<'a>
Sourcepub fn callback<R: RootContext + 'static>(
self,
callback: impl FnOnce(&mut R, &GrpcCallResponse) + 'static,
) -> Self
pub fn callback<R: RootContext + 'static>( self, callback: impl FnOnce(&mut R, &GrpcCallResponse) + 'static, ) -> Self
Set a response callback
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GrpcCallBuilder<'a>
impl<'a> !RefUnwindSafe for GrpcCallBuilder<'a>
impl<'a> !Send for GrpcCallBuilder<'a>
impl<'a> !Sync for GrpcCallBuilder<'a>
impl<'a> Unpin for GrpcCallBuilder<'a>
impl<'a> !UnwindSafe for GrpcCallBuilder<'a>
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