pub struct ThrowErrorBuilder { /* private fields */ }
Expand description
Configuration to throw an error in the context of a job.
Implementations§
Source§impl ThrowErrorBuilder
impl ThrowErrorBuilder
Sourcepub fn with_job_key(self, job_key: i64) -> Self
pub fn with_job_key(self, job_key: i64) -> Self
Set the unique job identifier, as obtained from Job::key
.
Sourcepub fn with_error_code<T: Into<String>>(self, error_code: T) -> Self
pub fn with_error_code<T: Into<String>>(self, error_code: T) -> Self
Set the error code that will be matched with an error catch event.
Sourcepub fn with_error_message<T: Into<String>>(self, error_message: T) -> Self
pub fn with_error_message<T: Into<String>>(self, error_message: T) -> Self
Set an optional message describing why the error was thrown.
Sourcepub async fn send(self) -> Result<ThrowErrorResponse>
pub async fn send(self) -> Result<ThrowErrorResponse>
Submit the throw error request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThrowErrorBuilder
impl !RefUnwindSafe for ThrowErrorBuilder
impl !Send for ThrowErrorBuilder
impl !Sync for ThrowErrorBuilder
impl Unpin for ThrowErrorBuilder
impl !UnwindSafe for ThrowErrorBuilder
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> 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