pub struct Events<T>{
pub auto_clear: bool,
/* private fields */
}
Fields§
§auto_clear: bool
Implementations§
Source§impl<T> Events<T>
impl<T> Events<T>
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>
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>
impl<T> PrefabProxy<EventsPrefabProxy<T>> for Events<T>
fn from_proxy_with_extras( proxy: EventsPrefabProxy<T>, _: &HashMap<String, Entity>, _: StateToken, ) -> Result<Self, PrefabError>
Auto Trait Implementations§
impl<T> Freeze for Events<T>
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