pub struct TaskPreparation { /* private fields */ }Expand description
Metadata and application state produced before task execution begins.
Implementations§
Source§impl TaskPreparation
impl TaskPreparation
Sourcepub fn with_meta(self, meta: Map<String, Value>) -> Self
pub fn with_meta(self, meta: Map<String, Value>) -> Self
Attach protocol _meta to every view of this task.
Sourcepub fn with_extension<T: Send + Sync + 'static>(self, value: T) -> Self
pub fn with_extension<T: Send + Sync + 'static>(self, value: T) -> Self
Make application state available to the background handler through
crate::extract::Extension.
Trait Implementations§
Source§impl Clone for TaskPreparation
impl Clone for TaskPreparation
Source§fn clone(&self) -> TaskPreparation
fn clone(&self) -> TaskPreparation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaskPreparation
impl Debug for TaskPreparation
Source§impl Default for TaskPreparation
impl Default for TaskPreparation
Source§fn default() -> TaskPreparation
fn default() -> TaskPreparation
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for TaskPreparation
impl !UnwindSafe for TaskPreparation
impl Freeze for TaskPreparation
impl Send for TaskPreparation
impl Sync for TaskPreparation
impl Unpin for TaskPreparation
impl UnsafeUnpin for TaskPreparation
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