Enum libredr_common::message::RequestTask
source · pub enum RequestTask {
RequestRayTracingForward(Box<RequestRayTracingForward>),
RequestRayTracingBackward(Box<RequestRayTracingBackward>),
}
Variants§
RequestRayTracingForward(Box<RequestRayTracingForward>)
RequestRayTracingBackward(Box<RequestRayTracingBackward>)
Implementations§
source§impl RequestTask
impl RequestTask
Functions to split task into multiple sub-tasks for worker
sourcepub fn split(
&self,
progress: &mut usize,
tile_size: usize,
data_cache: &DataCache,
) -> Result<Option<Self>>
pub fn split( &self, progress: &mut usize, tile_size: usize, data_cache: &DataCache, ) -> Result<Option<Self>>
Generate a sub-task by slicing current task from progress
to progress + tile_size
The last piece can be smaller than tile_size
progress
is updated automatically
sourcepub fn required_data(&self) -> HashSet<Hash>
pub fn required_data(&self) -> HashSet<Hash>
Get all hashes of lazy-loading Data
sourcepub fn new_response(&self) -> ResponseTask
pub fn new_response(&self) -> ResponseTask
Create an empty ResponseTask
as the same type of RequestTask
Trait Implementations§
source§impl Clone for RequestTask
impl Clone for RequestTask
source§fn clone(&self) -> RequestTask
fn clone(&self) -> RequestTask
Returns a copy 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 RequestTask
impl Debug for RequestTask
source§impl<'de> Deserialize<'de> for RequestTask
impl<'de> Deserialize<'de> for RequestTask
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 Display for RequestTask
impl Display for RequestTask
source§impl PartialEq for RequestTask
impl PartialEq for RequestTask
source§fn eq(&self, other: &RequestTask) -> bool
fn eq(&self, other: &RequestTask) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RequestTask
impl Serialize for RequestTask
impl StructuralPartialEq for RequestTask
Auto Trait Implementations§
impl Freeze for RequestTask
impl RefUnwindSafe for RequestTask
impl Send for RequestTask
impl Sync for RequestTask
impl Unpin for RequestTask
impl UnwindSafe for RequestTask
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.