Struct proxy_sdk::GrpcCallBuilder
source · 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> !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