Struct veloren_common_ecs::Job
source · pub struct Job<T>where
T: ?Sized,{
pub own: Box<T>,
pub cpu_stats: CpuTimeline,
}
Expand description
This Struct will wrap the System in order to avoid the can only impl trait for local defined structs error It also contains the cpu measurements
Fields§
§own: Box<T>
§cpu_stats: CpuTimeline
Trait Implementations§
source§impl<'a, T> System<'a> for Job<T>where
T: System<'a>,
impl<'a, T> System<'a> for Job<T>where
T: System<'a>,
§type SystemData = (<T as System<'a>>::SystemData, Read<'a, SysMetrics, PanicHandler>)
type SystemData = (<T as System<'a>>::SystemData, Read<'a, SysMetrics, PanicHandler>)
The resource bundle required to execute this system. Read more
§fn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTime
Returns a hint how long the system needs for running.
This is used to optimize the way they’re executed (might
allow more parallelization). Read more
Auto Trait Implementations§
impl<T> Freeze for Job<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Job<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Job<T>
impl<T> Sync for Job<T>
impl<T> Unpin for Job<T>where
T: ?Sized,
impl<T> UnwindSafe for Job<T>where
T: UnwindSafe + ?Sized,
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<'a, T> RunNow<'a> for Twhere
T: System<'a>,
impl<'a, T> RunNow<'a> for Twhere
T: System<'a>,
§impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.