Struct oxygengine_core::ecs::components::Events
source · [−]Fields
auto_clear: bool
Implementations
sourceimpl<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
sourceimpl<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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more