pub struct Builder<T>(/* private fields */);Expand description
A builder for TestWebhookResponse
Implementations§
Source§impl Builder<SuccessStage>
impl Builder<SuccessStage>
Sourcepub fn success(self, success: bool) -> Builder<StatusCodeStage>
pub fn success(self, success: bool) -> Builder<StatusCodeStage>
Sets the success field.
Source§impl Builder<StatusCodeStage>
impl Builder<StatusCodeStage>
Sourcepub fn status_code(self, status_code: i32) -> Builder<LatencyMillisStage>
pub fn status_code(self, status_code: i32) -> Builder<LatencyMillisStage>
Sets the status_code field.
Source§impl Builder<LatencyMillisStage>
impl Builder<LatencyMillisStage>
Sourcepub fn latency_millis(self, latency_millis: SafeLong) -> Builder<Complete>
pub fn latency_millis(self, latency_millis: SafeLong) -> Builder<Complete>
Sets the latency_millis field.
Source§impl Builder<Complete>
impl Builder<Complete>
Sourcepub fn status_code(self, status_code: i32) -> Self
pub fn status_code(self, status_code: i32) -> Self
Sets the status_code field.
Sourcepub fn response_body(self, response_body: impl Into<Option<String>>) -> Self
pub fn response_body(self, response_body: impl Into<Option<String>>) -> Self
Sets the response_body field.
Sourcepub fn error_message(self, error_message: impl Into<Option<String>>) -> Self
pub fn error_message(self, error_message: impl Into<Option<String>>) -> Self
Sets the error_message field.
Sourcepub fn evaluated_payload(
self,
evaluated_payload: impl Into<Option<String>>,
) -> Self
pub fn evaluated_payload( self, evaluated_payload: impl Into<Option<String>>, ) -> Self
Sets the evaluated_payload field.
Sourcepub fn latency_millis(self, latency_millis: SafeLong) -> Self
pub fn latency_millis(self, latency_millis: SafeLong) -> Self
Sets the latency_millis field.
Sourcepub fn build(self) -> TestWebhookResponse
pub fn build(self) -> TestWebhookResponse
Consumes the builder, returning a TestWebhookResponse.
Trait Implementations§
Source§impl Default for Builder<SuccessStage>
impl Default for Builder<SuccessStage>
Source§impl From<TestWebhookResponse> for Builder<Complete>
impl From<TestWebhookResponse> for Builder<Complete>
Source§fn from(v: TestWebhookResponse) -> Self
fn from(v: TestWebhookResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for Builder<T>where
T: Freeze,
impl<T> RefUnwindSafe for Builder<T>where
T: RefUnwindSafe,
impl<T> Send for Builder<T>where
T: Send,
impl<T> Sync for Builder<T>where
T: Sync,
impl<T> Unpin for Builder<T>where
T: Unpin,
impl<T> UnsafeUnpin for Builder<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Builder<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
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