Struct oxygengine::prelude::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) -> Events<T>
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, Global>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, RandomState>, _: ID<PhantomData<dyn State + Sync + Send>> ) -> Result<Events<T>, 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
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more