pub struct PersistedTaskState {Show 13 fields
pub service_id: u64,
pub call_id: u64,
pub output: Vec<u8>,
pub operator_count: u32,
pub threshold_type: PersistedThresholdType,
pub signer_bitmap: String,
pub signatures: HashMap<u32, String>,
pub public_keys: HashMap<u32, String>,
pub operator_stakes: HashMap<u32, u64>,
pub total_stake: u64,
pub submitted: bool,
pub created_at_ms: u64,
pub expires_at_ms: Option<u64>,
}Expand description
Serializable task state for persistence
Fields§
§service_id: u64Service ID
call_id: u64Call ID
output: Vec<u8>The output being signed
operator_count: u32Number of operators in the service
threshold_type: PersistedThresholdTypeThreshold type
signer_bitmap: StringBitmap of which operators have signed
signatures: HashMap<u32, String>Collected signatures indexed by operator index (hex encoded)
public_keys: HashMap<u32, String>Collected public keys indexed by operator index (hex encoded)
operator_stakes: HashMap<u32, u64>Operator stakes for stake-weighted thresholds
total_stake: u64Total stake of all operators
submitted: boolWhether this task has been submitted to chain
created_at_ms: u64When this task was created (unix timestamp millis)
expires_at_ms: Option<u64>When this task expires (unix timestamp millis, None = never)
Trait Implementations§
Source§impl Clone for PersistedTaskState
impl Clone for PersistedTaskState
Source§fn clone(&self) -> PersistedTaskState
fn clone(&self) -> PersistedTaskState
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 PersistedTaskState
impl Debug for PersistedTaskState
Source§impl<'de> Deserialize<'de> for PersistedTaskState
impl<'de> Deserialize<'de> for PersistedTaskState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PersistedTaskState
impl RefUnwindSafe for PersistedTaskState
impl Send for PersistedTaskState
impl Sync for PersistedTaskState
impl Unpin for PersistedTaskState
impl UnsafeUnpin for PersistedTaskState
impl UnwindSafe for PersistedTaskState
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 more