enum LoadState {
Pending(PendingAction),
LoadingProject {
project: Project,
path: PathBuf,
world: World,
entity_assets: HashMap<Entity, RenderableAsset>,
remaining: VecDeque<EntityRecord>,
total: usize,
},
LoadingScene {
path: PathBuf,
world: World,
entity_assets: HashMap<Entity, RenderableAsset>,
remaining: VecDeque<EntityRecord>,
total: usize,
},
}Expand description
Where a load currently stands, so it can be spread across several frames instead of blocking the main thread for its whole duration.
Variants§
Pending(PendingAction)
Requested but not started; the project itself hasn’t been created/opened yet.
LoadingProject
A New/Open Project action resolved into project; remaining entities for its start
scene (if any) are drained a few at a time (see LOAD_BUDGET_PER_FRAME) into world/
entity_assets each frame until empty, at which point this replaces open_scenes
wholesale — a different project’s tabs aren’t valid to keep around.
Fields
world: Worldentity_assets: HashMap<Entity, RenderableAsset>remaining: VecDeque<EntityRecord>LoadingScene
An additional scene in the current project is being opened as a new tab; remaining is
drained the same way, then the finished OpenScene is appended to open_scenes and
made active — every other already-open tab is left untouched throughout.
Auto Trait Implementations§
impl !RefUnwindSafe for LoadState
impl !UnwindSafe for LoadState
impl Freeze for LoadState
impl Send for LoadState
impl Sync for LoadState
impl Unpin for LoadState
impl UnsafeUnpin for LoadState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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