pub struct ContextSchema {
pub(crate) fields: Vec<ContextField>,
pub(crate) layout: Arc<FrozenBufferLayout>,
pub(super) user_var_offsets: FastMap<String, usize>,
pub(super) user_var_types: FastMap<String, FieldType>,
pub(super) spell_usable_offsets: FastMap<usize, SpellUsableOffsets>,
pub(super) cooldown_bypass_offsets: FastMap<usize, usize>,
}Expand description
Fully resolved runtime context layout.
Fields§
§fields: Vec<ContextField>§layout: Arc<FrozenBufferLayout>§user_var_offsets: FastMap<String, usize>§user_var_types: FastMap<String, FieldType>§spell_usable_offsets: FastMap<usize, SpellUsableOffsets>§cooldown_bypass_offsets: FastMap<usize, usize>Implementations§
Source§impl ContextSchema
impl ContextSchema
pub fn new_buffer(&self) -> DenseBuffer
Sourcepub fn new_bound_buffer(&self) -> BoundDenseBuffer
pub fn new_bound_buffer(&self) -> BoundDenseBuffer
Allocate the finalized capability used by engine mechanics for typed slot access.
pub fn buffer_size(&self) -> usize
pub fn layout_fingerprint(&self) -> LayoutFingerprint
Source§impl ContextSchema
impl ContextSchema
pub fn field_count(&self) -> usize
pub fn has_spell_usable_fields(&self) -> bool
pub(crate) fn field_offset(&self, resolved: &ResolvedFieldRead) -> Option<usize>
pub(crate) fn user_var_offset(&self, name: &str) -> Option<usize>
pub(crate) fn user_var_type(&self, name: &str) -> Option<FieldType>
pub(crate) fn spell_usable_offsets( &self, field_offset: usize, ) -> Option<&SpellUsableOffsets>
pub(crate) fn cooldown_bypass_aura_offset( &self, cooldown_offset: usize, ) -> Option<usize>
pub(in rotation) fn validate( &self, table: &DescriptorTable, ) -> Result<()>
fn validate_fields( &self, table: &DescriptorTable, byte_len: usize, ) -> Result<()>
fn validate_variables(&self, byte_len: usize) -> Result<()>
fn validate_spell_usability(&self, byte_len: usize) -> Result<()>
fn validate_cooldown_bypasses(&self, byte_len: usize) -> Result<()>
Trait Implementations§
Source§impl Clone for ContextSchema
impl Clone for ContextSchema
Source§fn clone(&self) -> ContextSchema
fn clone(&self) -> ContextSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContextSchema
impl RefUnwindSafe for ContextSchema
impl Send for ContextSchema
impl Sync for ContextSchema
impl Unpin for ContextSchema
impl UnsafeUnpin for ContextSchema
impl UnwindSafe for ContextSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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 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>
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