pub struct WindowSystem;Expand description
System for opening and managing the window.
Implementations§
Source§impl WindowSystem
impl WindowSystem
Sourcepub fn from_config_path(
world: &mut World,
events_loop: &EventsLoop,
path: impl AsRef<Path>,
) -> Result<Self, ConfigError>
pub fn from_config_path( world: &mut World, events_loop: &EventsLoop, path: impl AsRef<Path>, ) -> Result<Self, ConfigError>
Builds and spawns a new Window, using the provided DisplayConfig and EventsLoop as
sources. Returns a new WindowSystem
Sourcepub fn from_config(
world: &mut World,
events_loop: &EventsLoop,
config: DisplayConfig,
) -> Self
pub fn from_config( world: &mut World, events_loop: &EventsLoop, config: DisplayConfig, ) -> Self
Builds and spawns a new Window, using the provided DisplayConfig and EventsLoop as
sources. Returns a new WindowSystem
Trait Implementations§
Source§impl Debug for WindowSystem
impl Debug for WindowSystem
Source§impl<'a> System<'a> for WindowSystem
impl<'a> System<'a> for WindowSystem
Source§type SystemData = (Write<'a, ScreenDimensions, PanicHandler>, Read<'a, Window, PanicHandler>)
type SystemData = (Write<'a, ScreenDimensions, PanicHandler>, Read<'a, Window, PanicHandler>)
The resource bundle required to execute this system. Read more
Source§fn run(&mut self, (screen_dimensions, window): Self::SystemData)
fn run(&mut self, (screen_dimensions, window): Self::SystemData)
Executes the system with the required system
data.
Source§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
Source§fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the
SystemData.Auto Trait Implementations§
impl Freeze for WindowSystem
impl RefUnwindSafe for WindowSystem
impl Send for WindowSystem
impl Sync for WindowSystem
impl Unpin for WindowSystem
impl UnwindSafe for WindowSystem
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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
Source§fn run(&mut self, world: &'a World, _: &ThreadPool)
fn run(&mut self, world: &'a World, _: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending
on how the structure is set up. Read more
Source§fn reads(&self, reads: &mut Vec<ResourceId>)
fn reads(&self, reads: &mut Vec<ResourceId>)
Accumulates the necessary read/shared resources from the
systems in this group.
Source§fn writes(&self, writes: &mut Vec<ResourceId>)
fn writes(&self, writes: &mut Vec<ResourceId>)
Accumulates the necessary write/exclusive resources from the
systems in this group.
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.