pub struct ExecutionModuleReadRequest {
pub taskid: u64,
pub sha256: Vec<u8>,
pub offset: u64,
pub size: u64,
}Expand description
ExecutionModuleReadRequest asks the host for a module’s bytes from offset, at most size of them. The request never passes the module’s end and asks for at most 1 MiB. The Ark keeps one module request in flight per task. Each request gets 30s; an unanswered one fails the task.
Fields§
§taskid: u64Task id whose module the Ark needs
sha256: Vec<u8>Module’s SHA-256 digest, exactly 32 bytes
offset: u64Byte offset within the module
size: u64Most bytes to return, at most 1 MiB
Trait Implementations§
Source§impl Clone for ExecutionModuleReadRequest
impl Clone for ExecutionModuleReadRequest
Source§impl Debug for ExecutionModuleReadRequest
impl Debug for ExecutionModuleReadRequest
Source§impl Default for ExecutionModuleReadRequest
impl Default for ExecutionModuleReadRequest
impl Eq for ExecutionModuleReadRequest
Source§impl From<ExecutionModuleReadRequest> for Message
impl From<ExecutionModuleReadRequest> for Message
Source§fn from(message: ExecutionModuleReadRequest) -> Self
fn from(message: ExecutionModuleReadRequest) -> Self
Wraps a concrete payload in its corresponding message variant.
Source§impl Hash for ExecutionModuleReadRequest
impl Hash for ExecutionModuleReadRequest
Source§impl Message for ExecutionModuleReadRequest
impl Message for ExecutionModuleReadRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for ExecutionModuleReadRequest
Auto Trait Implementations§
impl Freeze for ExecutionModuleReadRequest
impl RefUnwindSafe for ExecutionModuleReadRequest
impl Send for ExecutionModuleReadRequest
impl Sync for ExecutionModuleReadRequest
impl Unpin for ExecutionModuleReadRequest
impl UnsafeUnpin for ExecutionModuleReadRequest
impl UnwindSafe for ExecutionModuleReadRequest
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