pub struct Wanted {
pub key: ResourceKey,
pub class: Class,
pub distance: u32,
pub deadline_ticks: u32,
}Expand description
One resource the engine wants resident this frame.
Fields§
§key: ResourceKeyThe resource.
class: ClassHow urgent it is.
distance: u32Walk distance from the viewer, in the engine’s units. Nearer is more urgent inside a class, and farther entries are evicted first.
deadline_ticks: u32Ticks until the data is needed (u32::MAX when unknown). Earlier
deadlines are requested first inside a class.
Implementations§
Source§impl Wanted
impl Wanted
Sourcepub const fn new(key: ResourceKey, class: Class, distance: u32) -> Self
pub const fn new(key: ResourceKey, class: Class, distance: u32) -> Self
A wanted entry with no deadline.
Sourcepub const fn with_deadline_ticks(self, deadline_ticks: u32) -> Self
pub const fn with_deadline_ticks(self, deadline_ticks: u32) -> Self
The same entry with a deadline.
Trait Implementations§
impl Copy for Wanted
impl Eq for Wanted
impl StructuralPartialEq for Wanted
Auto Trait Implementations§
impl Freeze for Wanted
impl RefUnwindSafe for Wanted
impl Send for Wanted
impl Sync for Wanted
impl Unpin for Wanted
impl UnsafeUnpin for Wanted
impl UnwindSafe for Wanted
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)