Struct jortestkit::load::Response
source · pub struct Response {
id: Option<Id>,
failure: Option<RequestFailure>,
status: RequestStatus,
duration: Duration,
}
Fields§
§id: Option<Id>
§failure: Option<RequestFailure>
§status: RequestStatus
§duration: Duration
Implementations§
source§impl Response
impl Response
pub fn success(id: Option<Id>, duration: Duration) -> Self
pub fn duration(&self) -> &Duration
pub fn id(&self) -> &Option<Id>
pub fn is_pending(&self) -> bool
pub fn is_success(&self) -> bool
pub fn is_failed(&self) -> bool
pub fn status(&self) -> &RequestStatus
pub fn has_id(&self, other: &str) -> bool
pub fn failure( id: Option<Id>, failure: RequestFailure, duration: Duration ) -> Self
pub fn pending(id: Option<Id>, duration: Duration) -> Self
pub fn into_failure(self, duration: Duration) -> Self
pub fn into_success(self, duration: Duration) -> Self
pub fn new_from_status(self, status: Status) -> Self
pub fn update_status(&mut self, status: Status)
pub fn err(&self) -> Option<RequestFailure>
pub fn is_err(&self) -> bool
pub fn is_ok(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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