Struct oxygengine_core::ecs::components::Events
source · pub struct Events<T>where
T: Send + Sync,{
pub auto_clear: bool,
/* private fields */
}
Fields§
§auto_clear: bool
Implementations§
source§impl<T> Events<T>where
T: Send + Sync,
impl<T> Events<T>where T: Send + Sync,
pub fn new(capacity: Option<usize>, auto_clear: bool) -> Self
pub fn clear(&mut self)
pub fn read(&self) -> impl Iterator<Item = &T>
pub fn consume(&mut self) -> impl Iterator<Item = T> + '_
pub fn consume_if<F>(&mut self, f: F) -> Vec<T>where F: FnMut(&T) -> bool,
pub fn send(&mut self, message: T)
pub fn try_send(&mut self, message: T) -> bool
Trait Implementations§
source§impl<T> PrefabProxy<EventsPrefabProxy<T>> for Events<T>where
T: Send + Sync + 'static,
impl<T> PrefabProxy<EventsPrefabProxy<T>> for Events<T>where T: Send + Sync + 'static,
fn from_proxy_with_extras( proxy: EventsPrefabProxy<T>, _: &HashMap<String, Entity>, _: StateToken ) -> Result<Self, PrefabError>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Events<T>where T: RefUnwindSafe,
impl<T> Send for Events<T>
impl<T> Sync for Events<T>
impl<T> Unpin for Events<T>where T: Unpin,
impl<T> UnwindSafe for Events<T>where T: UnwindSafe,
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