pub struct PovwJobId {
pub log: PovwLogId,
pub job: u64,
}
Expand description
Globally unique identifier for a proving job.
A proving job represents a single continuation (sequence of segments) being proven. The job ID combines a work log identifier with a job number to create a globally unique identifier that can generate nonces for each segment in the job.
Fields§
§log: PovwLogId
The work log that this job belongs to.
job: u64
Job number within the work log.
Implementations§
Source§impl PovwJobId
impl PovwJobId
Sourcepub fn nonce(self, segment_index: u32) -> PovwNonce
pub fn nonce(self, segment_index: u32) -> PovwNonce
Creates a nonce for a specific segment within this job.
Sourcepub fn to_bytes(self) -> [u8; 28]
pub fn to_bytes(self) -> [u8; 28]
Serializes the job ID to a byte array in little-endian format.
Sourcepub fn from_bytes(bytes: [u8; 28]) -> Self
pub fn from_bytes(bytes: [u8; 28]) -> Self
Deserializes a job ID from a byte array in little-endian format.
Trait Implementations§
Source§impl BorshDeserialize for PovwJobId
impl BorshDeserialize for PovwJobId
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for PovwJobId
impl BorshSerialize for PovwJobId
Source§impl<'de> Deserialize<'de> for PovwJobId
impl<'de> Deserialize<'de> for PovwJobId
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
Source§impl Distribution<PovwJobId> for StandardUniform
Available on crate feature rand
only.
impl Distribution<PovwJobId> for StandardUniform
Available on crate feature
rand
only.impl Copy for PovwJobId
impl Eq for PovwJobId
impl StructuralPartialEq for PovwJobId
Auto Trait Implementations§
impl Freeze for PovwJobId
impl RefUnwindSafe for PovwJobId
impl Send for PovwJobId
impl Sync for PovwJobId
impl Unpin for PovwJobId
impl UnwindSafe for PovwJobId
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