Struct dyer::component::task::Task [−][src]
pub struct Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone, { pub uri: String, pub method: String, pub headers: HashMap<String, String>, pub body: Option<HashMap<String, String>>, pub able: f64, pub trys: u8, pub parser: String, pub targs: Option<T>, }
Expand description
Task
, as it means, a scheduled job to be done, contains most infomation of Request
. For the purposes of extensive compatibility,
A generic parameter T
is required in dealing with it.
Fields
uri: String
method: String
headers: HashMap<String, String>
Expand description
additional headers if necessary
body: Option<HashMap<String, String>>
Expand description
Formdata or other request parameter stored here
able: f64
Expand description
checkpoint in seconds by which this Task
is allowed to be executed
trys: u8
Expand description
times that this Task
has failed, by default, the threshold is 2, customize it in ArgApp
parser: String
Expand description
the index to get the parser parsing the Response
when it’s done
targs: Option<T>
Expand description
additional arguments for extensive application
Implementations
Trait Implementations
impl<T: Clone> Clone for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
impl<T: Clone> Clone for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]impl<T: Debug> Debug for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
impl<T: Debug> Debug for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]impl<'de, T> Deserialize<'de> for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
impl<'de, T> Deserialize<'de> for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Task<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Task<T> where
T: Send,
T: Send,
impl<T> Sync for Task<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Task<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Task<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,