pub enum Fetch {
WorkPackage,
AuthCodeParam,
AuthToken,
AuthOutput,
AnyPayload(usize),
AnyExtrinsic {
work_item: usize,
index: usize,
},
OurExtrinsic(usize),
AnyImport {
work_item: usize,
index: usize,
},
OurImport(usize),
}Expand description
A definition of data to be fetched.
Variants§
WorkPackage
The current work-package.
AuthCodeParam
The parameterisation of the authorization code.
AuthToken
The input provided to the parameterized authorizer code.
AuthOutput
The output from the parameterized authorizer code.
AnyPayload(usize)
A given work-item’s payload.
AnyExtrinsic
A particular extrinsic of a given work-item.
Fields
OurExtrinsic(usize)
A particular extrinsic of the executing work-item.
AnyImport
A particular import-segment of a given work-item.
Fields
OurImport(usize)
A particular import-segment of the executing work-item.
Implementations§
Source§impl Fetch
impl Fetch
Sourcepub fn fetch_into(self, target: &mut [u8], skip: usize) -> Option<usize>
pub fn fetch_into(self, target: &mut [u8], skip: usize) -> Option<usize>
Fetch the data defined by this Fetch into the given target buffer.
target: The buffer to write the fetched data into.skip: The number of bytes to skip from the start of the data to be fetched.
Returns the full length of the data which is being fetched. If this is smaller than the
target’s length, then some of the buffer will not be written to. If the request does not
identify any data to be fetched (e.g. because an index is out of range) then returns None.