pub struct GrpcMethodRequest<D, S> {
pub destination: Uri,
pub service: ServiceDescriptor,
pub method: MethodDescriptor,
pub codec: MethodCodec<D, S>,
pub message: D,
}
Fields§
§destination: Uri
§service: ServiceDescriptor
§method: MethodDescriptor
§codec: MethodCodec<D, S>
§message: D
Implementations§
Source§impl<D, S> GrpcMethodRequest<D, S>
impl<D, S> GrpcMethodRequest<D, S>
pub fn format_method_path(&self) -> PathAndQuery
Trait Implementations§
Source§impl Assault<GrpcMethodRequest<Value, JsonSerializer>, Response<Value>> for GrpcAssault
impl Assault<GrpcMethodRequest<Value, JsonSerializer>, Response<Value>> for GrpcAssault
type Request = GrpcRequest
type Response = GrpcResponse
type Recorder = GrpcIoRecorder
fn command(&self) -> &Relentless
fn recorder(&self) -> Self::Recorder
async fn execute<S>(&self, service: S) -> Result<ExitCode, RelentlessError>where
Self::Request: RequestFactory<Req, S>,
<Self::Request as RequestFactory<Req, S>>::Error: Error + Send + Sync + 'static,
<Self::Response as Evaluate<Res>>::Message: Display,
S: Service<Req, Response = Res> + Clone + Send + 'static,
<S as Service<Req>>::Error: Error + Send + Sync + 'static,
<S as Service<Req>>::Future: Send + 'static,
§fn configs(
&self,
) -> (Vec<Config<Self::Request, Self::Response>>, Vec<RelentlessError>)
fn configs( &self, ) -> (Vec<Config<Self::Request, Self::Response>>, Vec<RelentlessError>)
TODO document
fn all_destinations( &self, configs: &[Config<Self::Request, Self::Response>], ) -> Vec<Uri>
§fn build_service<S>(&self, service: S) -> RecordService<S, Self::Recorder>
fn build_service<S>(&self, service: S) -> RecordService<S, Self::Recorder>
TODO document
async fn assault_with<S>( &self, configs: Vec<Config<Self::Request, Self::Response>>, service: S, ) -> Result<Report<<Self::Response as Evaluate<Res>>::Message, Self::Request, Self::Response>, RelentlessError>
fn report_with<W>( &self, report: &Report<<Self::Response as Evaluate<Res>>::Message, Self::Request, Self::Response>, write: W, ) -> Result<bool, Error>
fn pass( &self, report: &Report<<Self::Response as Evaluate<Res>>::Message, Self::Request, Self::Response>, ) -> bool
fn allow( &self, report: &Report<<Self::Response as Evaluate<Res>>::Message, Self::Request, Self::Response>, ) -> bool
fn exit_code( &self, report: &Report<<Self::Response as Evaluate<Res>>::Message, Self::Request, Self::Response>, ) -> ExitCode
Source§impl<D: Clone, S: Clone> Clone for GrpcMethodRequest<D, S>
impl<D: Clone, S: Clone> Clone for GrpcMethodRequest<D, S>
Source§fn clone(&self) -> GrpcMethodRequest<D, S>
fn clone(&self) -> GrpcMethodRequest<D, S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<De, Se> CollectClone<GrpcMethodRequest<De, Se>> for GrpcIoRecorderwhere
De: for<'a> Deserializer<'a> + DeserializeOwned + Send + Sync + 'static,
for<'a> <De as Deserializer<'a>>::Error: Error + Send + Sync + 'static,
Se: Clone + Send,
impl<De, Se> CollectClone<GrpcMethodRequest<De, Se>> for GrpcIoRecorderwhere
De: for<'a> Deserializer<'a> + DeserializeOwned + Send + Sync + 'static,
for<'a> <De as Deserializer<'a>>::Error: Error + Send + Sync + 'static,
Se: Clone + Send,
type Error = Error
async fn collect_clone( &self, r: GrpcMethodRequest<De, Se>, ) -> Result<(GrpcMethodRequest<De, Se>, GrpcMethodRequest<De, Se>), Self::Error>
Source§impl<De, Se> IoRecord<GrpcMethodRequest<De, Se>> for GrpcIoRecorderwhere
De: for<'a> Deserializer<'a> + Send + Sync + 'static,
for<'a> <De as Deserializer<'a>>::Error: Error + Send + Sync + 'static,
Se: Send,
impl<De, Se> IoRecord<GrpcMethodRequest<De, Se>> for GrpcIoRecorderwhere
De: for<'a> Deserializer<'a> + Send + Sync + 'static,
for<'a> <De as Deserializer<'a>>::Error: Error + Send + Sync + 'static,
Se: Send,
type Error = Error
fn extension(&self, _r: &GrpcMethodRequest<De, Se>) -> &'static str
async fn record<W: Write>( &self, w: &mut W, r: GrpcMethodRequest<De, Se>, ) -> Result<(), Self::Error>
async fn record_raw<W: Write + Send>( &self, w: &mut W, r: GrpcMethodRequest<De, Se>, ) -> Result<(), Self::Error>
Source§impl<S> RequestFactory<GrpcMethodRequest<Value, JsonSerializer>, S> for GrpcRequest
impl<S> RequestFactory<GrpcMethodRequest<Value, JsonSerializer>, S> for GrpcRequest
Source§impl<De, Se> RequestIoRecord<GrpcMethodRequest<De, Se>> for GrpcIoRecorder
impl<De, Se> RequestIoRecord<GrpcMethodRequest<De, Se>> for GrpcIoRecorder
fn record_dir(&self, r: &GrpcMethodRequest<De, Se>) -> PathBuf
Source§impl<S, De, Se> Service<GrpcMethodRequest<De, Se>> for GrpcClient<S>where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::ResponseBody: Send,
<S::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>>,
S::Future: Send + 'static,
De: for<'a> Deserializer<'a> + Send + Sync + 'static,
for<'a> <De as Deserializer<'a>>::Error: Error + Send + Sync + 'static,
Se: Serializer + Clone + Send + Sync + 'static,
Se::Ok: Send + Sync + 'static,
Se::Error: Error + Send + Sync + 'static,
impl<S, De, Se> Service<GrpcMethodRequest<De, Se>> for GrpcClient<S>where
S: GrpcService<BoxBody> + Clone + Send + 'static,
S::ResponseBody: Send,
<S::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>>,
S::Future: Send + 'static,
De: for<'a> Deserializer<'a> + Send + Sync + 'static,
for<'a> <De as Deserializer<'a>>::Error: Error + Send + Sync + 'static,
Se: Serializer + Clone + Send + Sync + 'static,
Se::Ok: Send + Sync + 'static,
Se::Error: Error + Send + Sync + 'static,
Source§type Error = GrpcClientError
type Error = GrpcClientError
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<GrpcClient<S> as Service<GrpcMethodRequest<De, Se>>>::Response, <GrpcClient<S> as Service<GrpcMethodRequest<De, Se>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<GrpcClient<S> as Service<GrpcMethodRequest<De, Se>>>::Response, <GrpcClient<S> as Service<GrpcMethodRequest<De, Se>>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(&mut self, req: GrpcMethodRequest<De, Se>) -> Self::Future
fn call(&mut self, req: GrpcMethodRequest<De, Se>) -> Self::Future
Process the request and return the response asynchronously. Read more
impl<D, S> StructuralPartialEq for GrpcMethodRequest<D, S>
Auto Trait Implementations§
impl<D, S> !Freeze for GrpcMethodRequest<D, S>
impl<D, S> RefUnwindSafe for GrpcMethodRequest<D, S>where
D: RefUnwindSafe,
S: RefUnwindSafe,
impl<D, S> Send for GrpcMethodRequest<D, S>
impl<D, S> Sync for GrpcMethodRequest<D, S>
impl<D, S> Unpin for GrpcMethodRequest<D, S>
impl<D, S> UnwindSafe for GrpcMethodRequest<D, S>where
D: UnwindSafe,
S: 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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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