Skip to main content

TaskResponse

pub trait TaskResponse:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn reference_task_index(&self) -> TaskIndex;
    fn encode(&self) -> Vec<u8> ;

    // Provided method
    fn digest(&self) -> FixedBytes<32> { ... }
}
Expand description

Trait for a generic task response

Required Methods§

Source

fn reference_task_index(&self) -> TaskIndex

Get the task index this response refers to

Source

fn encode(&self) -> Vec<u8>

Encode the response to bytes for hashing

Provided Methods§

Source

fn digest(&self) -> FixedBytes<32>

Create a digest of the response

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§