Struct dyer::component::task::Task [−][src]
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>
additional headers if necessary
body: Option<HashMap<String, String>>
Formdata or other request parameter stored here
able: f64
checkpoint in seconds by which this Task
is allowed to be executed
trys: u8
times that this Task
has failed, by default, the threshold is 2, customize it in AppArg
parser: String
the index to get the parser parsing the Response
when it’s done
targs: Option<T>
additional arguments for extensive application
Implementations
impl<T> Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
pub fn stored(path: &str, task: &mut Arc<Mutex<Vec<Task<T>>>>)
[src]
store unfinished or extra Task
s,
pub fn load(path: &str) -> Vec<Task<T>>
[src]
load unfinished or extra Task
s
Trait Implementations
impl<T: Clone> Clone for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
impl<T: Debug> Debug for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
impl<T> Default for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Clone + Debug,
[src]
T: Serialize + for<'a> Deserialize<'a> + Clone + Debug,
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]
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T> Serialize for Task<T> where
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
[src]
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
T: Serialize + for<'a> Deserialize<'a> + Debug + Clone,
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,