pub struct DenseBuffer {
chunks: Vec<SlotChunk>,
byte_len: usize,
pub(super) offsets: BufferOffsets,
standalone_defaults: Vec<(ByteOffset, &'static DefaultValue)>,
}Expand description
Flat byte buffer holding all runtime rotation state for zero-allocation evaluation.
Fields§
§chunks: Vec<SlotChunk>§byte_len: usize§offsets: BufferOffsets§standalone_defaults: Vec<(ByteOffset, &'static DefaultValue)>Implementations§
Source§impl DenseBuffer
impl DenseBuffer
pub fn new(offsets: BufferOffsets, size: usize) -> Self
Sourcepub fn aura_keys(&self) -> impl Iterator<Item = AuraKey> + '_
pub fn aura_keys(&self) -> impl Iterator<Item = AuraKey> + '_
Snapshot the concrete aura identities currently allocated in this buffer.
Sourcepub fn aura_projection_keys(
&self,
) -> impl Iterator<Item = AuraProjectionKey> + '_
pub fn aura_projection_keys( &self, ) -> impl Iterator<Item = AuraProjectionKey> + '_
Snapshot the APL aura category projections allocated by the rotation schema.
pub fn as_ptr(&self) -> *const u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Sourcepub fn bytes_mut(&mut self) -> &mut [u8] ⓘ
pub fn bytes_mut(&mut self) -> &mut [u8] ⓘ
Active mutable byte view. See Self::bytes.
Sourcepub fn history_iter_mut(&mut self) -> HistoryIterMut<'_> ⓘ
pub fn history_iter_mut(&mut self) -> HistoryIterMut<'_> ⓘ
Mutable in-place iterator over every HistorySlot without allocating a key list.
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear every history slot’s previous-cast flags (prev_gcd / prev_off_gcd).
Sourcepub fn reset_and_defaults(&mut self)
pub fn reset_and_defaults(&mut self)
Zero the buffer and write standalone field defaults.
fn slot_ref<T>(&self, base: ByteOffset) -> &Twhere
T: Pod,
fn slot_mut<T>(&mut self, base: ByteOffset) -> &mut Twhere
T: Pod,
fn resize_bytes(&mut self, new_byte_len: usize)
fn align_to_slot(&mut self) -> usize
fn populate_standalone_defaults(&mut self)
pub fn player(&self) -> &PlayerSlot
pub fn player_mut(&mut self) -> &mut PlayerSlot
pub fn combat(&self) -> &CombatSlot
pub fn combat_mut(&mut self) -> &mut CombatSlot
pub fn pet(&self) -> &PetSlot
pub fn pet_mut(&mut self) -> &mut PetSlot
pub fn cooldown(&self, key: SpellIdx) -> Option<&CooldownSlot>
pub fn cooldown_mut(&mut self, key: SpellIdx) -> Option<&mut CooldownSlot>
pub fn aura(&self, key: AuraKey) -> Option<&AuraSlot>
pub fn aura_mut(&mut self, key: AuraKey) -> Option<&mut AuraSlot>
pub fn aura_projection(&self, key: AuraProjectionKey) -> Option<&AuraSlot>
pub fn aura_projection_mut( &mut self, key: AuraProjectionKey, ) -> Option<&mut AuraSlot>
pub fn resource(&self, key: ResourceType) -> Option<&ResourceSlot>
pub fn resource_mut(&mut self, key: ResourceType) -> Option<&mut ResourceSlot>
pub fn spell(&self, key: SpellIdx) -> Option<&SpellSlot>
pub fn spell_mut(&mut self, key: SpellIdx) -> Option<&mut SpellSlot>
pub fn history(&self, key: SpellIdx) -> Option<&HistorySlot>
pub fn history_mut(&mut self, key: SpellIdx) -> Option<&mut HistorySlot>
pub fn talent(&self, key: &str) -> Option<&TalentSlot>
pub fn talent_mut(&mut self, key: &str) -> Option<&mut TalentSlot>
pub fn hero_tree(&self, key: &str) -> Option<&HeroTreeSlot>
pub fn hero_tree_mut(&mut self, key: &str) -> Option<&mut HeroTreeSlot>
pub fn item(&self, key: &str) -> Option<&ItemSlot>
pub fn item_mut(&mut self, key: &str) -> Option<&mut ItemSlot>
pub fn swing(&self, key: &str) -> Option<&SwingSlot>
pub fn swing_mut(&mut self, key: &str) -> Option<&mut SwingSlot>
pub fn equipment(&self, key: &str) -> Option<&EquipmentSlot>
pub fn equipment_mut(&mut self, key: &str) -> Option<&mut EquipmentSlot>
pub fn set_bonus(&self, key: &str) -> Option<&SetBonusSlot>
pub fn set_bonus_mut(&mut self, key: &str) -> Option<&mut SetBonusSlot>
pub fn unit(&self, key: &str) -> Option<&UnitSlot>
pub fn unit_mut(&mut self, key: &str) -> Option<&mut UnitSlot>
pub fn weapon_imbue(&self, key: &str) -> Option<&WeaponImbueSlot>
pub fn weapon_imbue_mut(&mut self, key: &str) -> Option<&mut WeaponImbueSlot>
Sourcepub fn ensure_swing_slot(&mut self, key: &str) -> bool
pub fn ensure_swing_slot(&mut self, key: &str) -> bool
Ensure a SwingSlot exists for key, returning true if it already existed.
Sourcepub fn ensure_unit_slot(&mut self, key: &str) -> bool
pub fn ensure_unit_slot(&mut self, key: &str) -> bool
Ensure a UnitSlot exists for key, returning true if it already existed.
Sourcepub fn ensure_weapon_imbue_slot(&mut self, key: &str) -> bool
pub fn ensure_weapon_imbue_slot(&mut self, key: &str) -> bool
Ensure a WeaponImbueSlot exists for key, returning true if it already existed.
Sourcepub fn ensure_aura_slot(&mut self, key: AuraKey) -> bool
pub fn ensure_aura_slot(&mut self, key: AuraKey) -> bool
Ensure a AuraSlot exists for key, returning true if it already existed.
Sourcepub fn ensure_aura_projection_slot(&mut self, key: AuraProjectionKey) -> bool
pub fn ensure_aura_projection_slot(&mut self, key: AuraProjectionKey) -> bool
Ensure a AuraSlot exists for key, returning true if it already existed.
Sourcepub fn ensure_spell_slot(&mut self, spell: SpellIdx) -> bool
pub fn ensure_spell_slot(&mut self, spell: SpellIdx) -> bool
Ensure a SpellSlot exists for spell, returning true if it already existed.
Sourcepub fn ensure_cooldown_slot(&mut self, spell: SpellIdx) -> bool
pub fn ensure_cooldown_slot(&mut self, spell: SpellIdx) -> bool
Ensure a CooldownSlot exists for spell, returning true if it already existed.
Sourcepub fn ensure_resource_slot(&mut self, resource: ResourceType) -> bool
pub fn ensure_resource_slot(&mut self, resource: ResourceType) -> bool
Ensure a ResourceSlot exists for resource, returning true if it already existed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DenseBuffer
impl RefUnwindSafe for DenseBuffer
impl Send for DenseBuffer
impl Sync for DenseBuffer
impl Unpin for DenseBuffer
impl UnsafeUnpin for DenseBuffer
impl UnwindSafe for DenseBuffer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more