[−][src]Struct bevy_render::batch::Batcher
An unordered batcher intended to support an arbitrary number of keys of the same type (but with some distinguishing factor) NOTE: this may or may not be useful for anything. when paired with a higher-level "BatcherSet" it would allow updating batches
Fields
batches: HashMap<BatchKey<TKey>, Batch<TKey, TValue, TData>>
is_index: Vec<fn(_: &TKey) -> bool>
key_states: HashMap<TValue, BatcherKeyState<TKey>>
key_count: usize
Implementations
impl<TKey, TValue, TData> Batcher<TKey, TValue, TData> where
TKey: Key,
TValue: Clone + Eq + Hash,
TData: Default,
[src]
TKey: Key,
TValue: Clone + Eq + Hash,
TData: Default,
pub fn new(is_index: Vec<fn(_: &TKey) -> bool>) -> Self
[src]
pub fn get_batch(
&self,
batch_key: &BatchKey<TKey>
) -> Option<&Batch<TKey, TValue, TData>>
[src]
&self,
batch_key: &BatchKey<TKey>
) -> Option<&Batch<TKey, TValue, TData>>
pub fn get_batch_mut(
&mut self,
batch_key: &BatchKey<TKey>
) -> Option<&mut Batch<TKey, TValue, TData>>
[src]
&mut self,
batch_key: &BatchKey<TKey>
) -> Option<&mut Batch<TKey, TValue, TData>>
pub fn add(&mut self, key: TKey, value: TValue) -> bool
[src]
pub fn iter(&self) -> impl Iterator<Item = &Batch<TKey, TValue, TData>>
[src]
pub fn iter_mut(
&mut self
) -> impl Iterator<Item = &mut Batch<TKey, TValue, TData>>
[src]
&mut self
) -> impl Iterator<Item = &mut Batch<TKey, TValue, TData>>
Auto Trait Implementations
impl<TKey, TValue, TData> RefUnwindSafe for Batcher<TKey, TValue, TData> where
TData: RefUnwindSafe,
TKey: RefUnwindSafe,
TValue: RefUnwindSafe,
TData: RefUnwindSafe,
TKey: RefUnwindSafe,
TValue: RefUnwindSafe,
impl<TKey, TValue, TData> Send for Batcher<TKey, TValue, TData> where
TData: Send,
TKey: Send + Sync,
TValue: Send,
TData: Send,
TKey: Send + Sync,
TValue: Send,
impl<TKey, TValue, TData> Sync for Batcher<TKey, TValue, TData> where
TData: Sync,
TKey: Sync,
TValue: Sync,
TData: Sync,
TKey: Sync,
TValue: Sync,
impl<TKey, TValue, TData> Unpin for Batcher<TKey, TValue, TData> where
TData: Unpin,
TKey: Unpin,
TValue: Unpin,
TData: Unpin,
TKey: Unpin,
TValue: Unpin,
impl<TKey, TValue, TData> UnwindSafe for Batcher<TKey, TValue, TData> where
TData: UnwindSafe,
TKey: RefUnwindSafe + UnwindSafe,
TValue: UnwindSafe,
TData: UnwindSafe,
TKey: RefUnwindSafe + UnwindSafe,
TValue: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,