Skip to main content

DenseBuffer

Struct DenseBuffer 

Source
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

Source

pub fn new(offsets: BufferOffsets, size: usize) -> Self

Source

pub fn aura_keys(&self) -> impl Iterator<Item = AuraKey> + '_

Snapshot the concrete aura identities currently allocated in this buffer.

Source

pub fn aura_projection_keys( &self, ) -> impl Iterator<Item = AuraProjectionKey> + '_

Snapshot the APL aura category projections allocated by the rotation schema.

Source

pub fn as_ptr(&self) -> *const u8

Source

pub fn as_mut_ptr(&mut self) -> *mut u8

Source

pub fn bytes(&self) -> &[u8]

Active byte view truncated to the schema-declared byte_len.

Source

pub fn bytes_mut(&mut self) -> &mut [u8]

Active mutable byte view. See Self::bytes.

Source

pub fn history_iter_mut(&mut self) -> HistoryIterMut<'_>

Mutable in-place iterator over every HistorySlot without allocating a key list.

Source

pub fn clear_history(&mut self)

Clear every history slot’s previous-cast flags (prev_gcd / prev_off_gcd).

Source

pub fn reset_and_defaults(&mut self)

Zero the buffer and write standalone field defaults.

Source

fn slot_ref<T>(&self, base: ByteOffset) -> &T
where T: Pod,

Source

fn slot_mut<T>(&mut self, base: ByteOffset) -> &mut T
where T: Pod,

Source

fn resize_bytes(&mut self, new_byte_len: usize)

Source

fn align_to_slot(&mut self) -> usize

Source

fn populate_standalone_defaults(&mut self)

Source

pub fn player(&self) -> &PlayerSlot

Source

pub fn player_mut(&mut self) -> &mut PlayerSlot

Source

pub fn combat(&self) -> &CombatSlot

Source

pub fn combat_mut(&mut self) -> &mut CombatSlot

Source

pub fn pet(&self) -> &PetSlot

Source

pub fn pet_mut(&mut self) -> &mut PetSlot

Source

pub fn cooldown(&self, key: SpellIdx) -> Option<&CooldownSlot>

Source

pub fn cooldown_mut(&mut self, key: SpellIdx) -> Option<&mut CooldownSlot>

Source

pub fn aura(&self, key: AuraKey) -> Option<&AuraSlot>

Source

pub fn aura_mut(&mut self, key: AuraKey) -> Option<&mut AuraSlot>

Source

pub fn aura_projection(&self, key: AuraProjectionKey) -> Option<&AuraSlot>

Source

pub fn aura_projection_mut( &mut self, key: AuraProjectionKey, ) -> Option<&mut AuraSlot>

Source

pub fn resource(&self, key: ResourceType) -> Option<&ResourceSlot>

Source

pub fn resource_mut(&mut self, key: ResourceType) -> Option<&mut ResourceSlot>

Source

pub fn spell(&self, key: SpellIdx) -> Option<&SpellSlot>

Source

pub fn spell_mut(&mut self, key: SpellIdx) -> Option<&mut SpellSlot>

Source

pub fn history(&self, key: SpellIdx) -> Option<&HistorySlot>

Source

pub fn history_mut(&mut self, key: SpellIdx) -> Option<&mut HistorySlot>

Source

pub fn talent(&self, key: &str) -> Option<&TalentSlot>

Source

pub fn talent_mut(&mut self, key: &str) -> Option<&mut TalentSlot>

Source

pub fn hero_tree(&self, key: &str) -> Option<&HeroTreeSlot>

Source

pub fn hero_tree_mut(&mut self, key: &str) -> Option<&mut HeroTreeSlot>

Source

pub fn item(&self, key: &str) -> Option<&ItemSlot>

Source

pub fn item_mut(&mut self, key: &str) -> Option<&mut ItemSlot>

Source

pub fn swing(&self, key: &str) -> Option<&SwingSlot>

Source

pub fn swing_mut(&mut self, key: &str) -> Option<&mut SwingSlot>

Source

pub fn equipment(&self, key: &str) -> Option<&EquipmentSlot>

Source

pub fn equipment_mut(&mut self, key: &str) -> Option<&mut EquipmentSlot>

Source

pub fn set_bonus(&self, key: &str) -> Option<&SetBonusSlot>

Source

pub fn set_bonus_mut(&mut self, key: &str) -> Option<&mut SetBonusSlot>

Source

pub fn unit(&self, key: &str) -> Option<&UnitSlot>

Source

pub fn unit_mut(&mut self, key: &str) -> Option<&mut UnitSlot>

Source

pub fn weapon_imbue(&self, key: &str) -> Option<&WeaponImbueSlot>

Source

pub fn weapon_imbue_mut(&mut self, key: &str) -> Option<&mut WeaponImbueSlot>

Source

pub fn ensure_swing_slot(&mut self, key: &str) -> bool

Ensure a SwingSlot exists for key, returning true if it already existed.

Source

pub fn ensure_unit_slot(&mut self, key: &str) -> bool

Ensure a UnitSlot exists for key, returning true if it already existed.

Source

pub fn ensure_weapon_imbue_slot(&mut self, key: &str) -> bool

Ensure a WeaponImbueSlot exists for key, returning true if it already existed.

Source

pub fn ensure_aura_slot(&mut self, key: AuraKey) -> bool

Ensure a AuraSlot exists for key, returning true if it already existed.

Source

pub fn ensure_aura_projection_slot(&mut self, key: AuraProjectionKey) -> bool

Ensure a AuraSlot exists for key, returning true if it already existed.

Source

pub fn ensure_spell_slot(&mut self, spell: SpellIdx) -> bool

Ensure a SpellSlot exists for spell, returning true if it already existed.

Source

pub fn ensure_cooldown_slot(&mut self, spell: SpellIdx) -> bool

Ensure a CooldownSlot exists for spell, returning true if it already existed.

Source

pub fn ensure_resource_slot(&mut self, resource: ResourceType) -> bool

Ensure a ResourceSlot exists for resource, returning true if it already existed.

Source§

impl DenseBuffer

Source

pub fn dump(&self) -> String

Produce a human-readable dump of the entire buffer state.

Trait Implementations§

Source§

impl Debug for DenseBuffer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SpecConfig for T
where T: Any + Debug + Send,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> ResolverSyncBound for T
where T: Sync + ?Sized,