pub struct TaskMetadata { /* private fields */ }Expand description
Contains the metadata required to initialize a new task.
Implementations§
Source§impl TaskMetadata
impl TaskMetadata
Sourcepub fn new(
task_index: TaskIndex,
task_created_block: u64,
quorum_numbers: Vec<u8>,
quorum_threshold_percentages: QuorumThresholdPercentages,
time_to_expiry: Duration,
) -> Self
pub fn new( task_index: TaskIndex, task_created_block: u64, quorum_numbers: Vec<u8>, quorum_threshold_percentages: QuorumThresholdPercentages, time_to_expiry: Duration, ) -> Self
Creates a new instance of TaskMetadata
§Arguments
task_index- index of the tasktask_created_block- block number at which the task was createdquorum_numbers- quorum numbers which should respond to the taskquorum_threshold_percentages- threshold percentages for each quorumtime_to_expiry- time until the task expires
Use with_window_duration to set the window duration.
If the window duration is not set, it will default to Duration::ZERO.
§Returns
A new instance of TaskMetadata
Sourcepub fn with_window_duration(self, window_duration: Duration) -> Self
pub fn with_window_duration(self, window_duration: Duration) -> Self
Sets the window duration for the task
§Arguments
window_duration- The duration of the window to wait for signatures after quorum is reached
§Returns
An instance of TaskMetadata with the window duration set
Trait Implementations§
Source§impl Clone for TaskMetadata
impl Clone for TaskMetadata
Source§fn clone(&self) -> TaskMetadata
fn clone(&self) -> TaskMetadata
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 moreAuto Trait Implementations§
impl Freeze for TaskMetadata
impl RefUnwindSafe for TaskMetadata
impl Send for TaskMetadata
impl Sync for TaskMetadata
impl Unpin for TaskMetadata
impl UnsafeUnpin for TaskMetadata
impl UnwindSafe for TaskMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.