pub struct TaskPayload { /* private fields */ }Expand description
Opaque payload bytes bundled with an optional content-type hint.
Groups the two fields that are always set together when constructing or updating a task’s executable content.
Implementations§
Source§impl TaskPayload
impl TaskPayload
Sourcepub fn with_content_type(
bytes: Vec<u8>,
content_type: impl Into<String>,
) -> Self
pub fn with_content_type( bytes: Vec<u8>, content_type: impl Into<String>, ) -> Self
Creates a new payload with a content-type hint.
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Returns the optional content-type hint.
Trait Implementations§
Source§impl Clone for TaskPayload
impl Clone for TaskPayload
Source§fn clone(&self) -> TaskPayload
fn clone(&self) -> TaskPayload
Returns a duplicate of the value. Read more
1.0.0 · 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 TaskPayload
impl Debug for TaskPayload
Source§impl PartialEq for TaskPayload
impl PartialEq for TaskPayload
impl Eq for TaskPayload
impl StructuralPartialEq for TaskPayload
Auto Trait Implementations§
impl Freeze for TaskPayload
impl RefUnwindSafe for TaskPayload
impl Send for TaskPayload
impl Sync for TaskPayload
impl Unpin for TaskPayload
impl UnsafeUnpin for TaskPayload
impl UnwindSafe for TaskPayload
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