Enum goose::goose::TransactionError
source · [−]pub enum TransactionError {
Reqwest(Error),
Url(ParseError),
RequestFailed {
raw_request: GooseRequestMetric,
},
RequestCanceled {
source: SendError<bool>,
},
MetricsFailed {
source: SendError<GooseMetric>,
},
LoggerFailed {
source: SendError<Option<GooseLog>>,
},
InvalidMethod {
method: Method,
},
}
Expand description
An enumeration of all errors a Transaction
can return.
Variants
Reqwest(Error)
Wraps a reqwest::Error
.
Url(ParseError)
Wraps a url::ParseError
.
RequestFailed
Fields
raw_request: GooseRequestMetric
The GooseRequestMetric
that failed.
The request failed.
RequestCanceled
Fields
source: SendError<bool>
Wraps a flume::SendError
,
a GooseRequestMetric
has not yet been constructed.
The request was canceled. This happens when the throttle is enabled and the load test finishes.
MetricsFailed
Fields
source: SendError<GooseMetric>
Wraps a flume::SendError
,
which contains the GooseMetric
that wasn’t sent.
There was an error sending the metrics for a request to the parent thread.
LoggerFailed
Fields
source: SendError<Option<GooseLog>>
Wraps a flume::SendError
,
which contains the GooseDebug
that wasn’t sent.
There was an error sending debug information to the logger thread.
InvalidMethod
Fields
method: Method
The unrecognized HTTP request method.
Attempted an unrecognized HTTP request method.
Trait Implementations
sourceimpl Debug for TransactionError
impl Debug for TransactionError
sourceimpl Display for TransactionError
impl Display for TransactionError
Implement format trait to allow displaying errors.
sourceimpl Error for TransactionError
impl Error for TransactionError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for TransactionError
impl From<Error> for TransactionError
Auto-convert Reqwest errors.
sourcefn from(err: Error) -> TransactionError
fn from(err: Error) -> TransactionError
sourceimpl From<ParseError> for TransactionError
impl From<ParseError> for TransactionError
Auto-convert Url errors.
sourcefn from(err: ParseError) -> TransactionError
fn from(err: ParseError) -> TransactionError
sourceimpl From<SendError<GooseMetric>> for TransactionError
impl From<SendError<GooseMetric>> for TransactionError
Attempt to send metrics to the parent thread failed.
sourcefn from(source: SendError<GooseMetric>) -> TransactionError
fn from(source: SendError<GooseMetric>) -> TransactionError
sourceimpl From<SendError<Option<GooseLog>>> for TransactionError
impl From<SendError<Option<GooseLog>>> for TransactionError
Attempt to send logs to the logger thread failed.
sourceimpl From<SendError<bool>> for TransactionError
impl From<SendError<bool>> for TransactionError
When the throttle is enabled and the load test ends, the throttle channel is
shut down. This causes a
flume::SendError
,
which gets automatically converted to RequestCanceled
.
RequestCanceled
sourcefn from(source: SendError<bool>) -> TransactionError
fn from(source: SendError<bool>) -> TransactionError
Auto Trait Implementations
impl !RefUnwindSafe for TransactionError
impl Send for TransactionError
impl Sync for TransactionError
impl Unpin for TransactionError
impl !UnwindSafe for TransactionError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more