Struct oxygengine_core::ecs::shred::Entry [−][src]
pub struct Entry<'a, T> where
T: 'a, { /* fields omitted */ }Expand description
An entry to a resource of the World struct.
This is similar to the Entry API found in the standard library.
Examples
use shred::World; #[derive(Debug)] struct Res(i32); let mut world = World::empty(); let value = world.entry().or_insert(Res(4)); println!("{:?}", value.0 * 2);
Implementations
Returns this entry’s value, inserts and returns v otherwise.
Please note that you should use or_insert_with in case the creation of
the value is expensive.
Returns this entry’s value, inserts and returns the return value of f
otherwise.
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Entry<'a, T>impl<'a, T> !UnwindSafe for Entry<'a, T>Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any, pub fn get_type_id(&self) -> TypeIdMutably borrows from an owned value. Read more