Skip to main content

DynamicListVariableSlot

Struct DynamicListVariableSlot 

Source
pub struct DynamicListVariableSlot<S> {
    pub entity: EntityClassId,
    pub variable: VariableId,
    pub entity_type_name: &'static str,
    pub variable_name: &'static str,
    /* private fields */
}
Expand description

Public dynamic list variable slot.

Fields§

§entity: EntityClassId§variable: VariableId§entity_type_name: &'static str§variable_name: &'static str

Implementations§

Source§

impl<S> DynamicListVariableSlot<S>

Source

pub fn try_with_access( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, access: Arc<dyn DynamicListAccess<S>>, ) -> Result<DynamicListVariableSlot<S>, String>

Fallible access constructor for integrations that compile a slot from runtime schema. This verifies that the object supplying mutations is bound to exactly the same logical entity and variable as the slot.

Integrations requiring immutable metadata can use Self::with_access_and_metadata to validate both bindings together.

Source

pub fn with_access_and_metadata( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, access: Arc<dyn DynamicListAccess<S>>, metadata: Arc<dyn DynamicListMetadata<S>>, ) -> Result<DynamicListVariableSlot<S>, String>

Constructs a slot with its immutable, structurally bound metadata.

Metadata identity is checked immediately; a binding implementation cannot accidentally be reused for a same-named variable in another entity class. Phase assembly remains responsible for rejecting a selected family whose specific capability bit is absent.

Source

pub fn with_metadata( self, metadata: Arc<dyn DynamicListMetadata<S>>, ) -> Result<DynamicListVariableSlot<S>, String>

Attaches immutable metadata after access construction while preserving the same structural identity validation as Self::with_access_and_metadata.

Source

pub fn resolve_descriptor_index( &mut self, descriptor: &SolutionDescriptor, ) -> Result<(), String>

Source

pub fn resolved_against( self, descriptor: &SolutionDescriptor, ) -> Result<DynamicListVariableSlot<S>, String>

Source

pub fn is_descriptor_resolved(&self) -> bool

Source

pub fn descriptor_index(&self) -> usize

Source

pub fn descriptor_variable_index(&self) -> usize

Source

pub fn matches_target( &self, entity_class: Option<&str>, variable_name: Option<&str>, ) -> bool

Source

pub fn entity_count(&self, solution: &S) -> usize

Source

pub fn element_count(&self, solution: &S) -> usize

Source

pub fn element(&self, solution: &S, element_index: usize) -> Option<usize>

Source

pub fn assigned_elements(&self, solution: &S) -> Vec<usize>

Source

pub fn list_len(&self, solution: &S, row: usize) -> usize

Source

pub fn list_get(&self, solution: &S, row: usize, pos: usize) -> Option<usize>

Source

pub fn list_insert( &self, solution: &mut S, row: usize, pos: usize, value: usize, )

Source

pub fn list_remove( &self, solution: &mut S, row: usize, pos: usize, ) -> Option<usize>

Source

pub fn access_capabilities(&self) -> DynamicListAccessCapabilities

Source

pub fn list_set( &self, solution: &mut S, row: usize, pos: usize, value: usize, ) -> bool

Source

pub fn list_replace( &self, solution: &mut S, row: usize, values: Vec<usize>, ) -> bool

Replaces a complete list row as one logical mutation. Dynamic kernels use this for route replacement rather than composing remove/insert and accidentally publishing multiple dirty/revision transitions.

Source

pub fn list_reverse( &self, solution: &mut S, row: usize, start: usize, end: usize, ) -> bool

Source

pub fn sublist_remove( &self, solution: &mut S, row: usize, start: usize, end: usize, ) -> Option<Vec<usize>>

Source

pub fn sublist_insert( &self, solution: &mut S, row: usize, pos: usize, values: Vec<usize>, ) -> bool

Source

pub fn metadata(&self) -> Option<&dyn DynamicListMetadata<S>>

Returns slot-bound metadata when the integration compiled it.

Absence is intentional and must cause a selected metadata-dependent phase to fail validation; it is never a request to synthesize defaults.

Source

pub fn metadata_capabilities(&self) -> Option<DynamicListMetadataCapabilities>

Source

pub fn require_metadata(&self) -> Result<&dyn DynamicListMetadata<S>, String>

Source§

impl<S> DynamicListVariableSlot<S>

Source

pub fn new( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, ) -> DynamicListVariableSlot<S>

Source

pub fn new_with_metadata( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, metadata: Arc<dyn DynamicListMetadata<S>>, ) -> Result<DynamicListVariableSlot<S>, String>

Backend-access convenience constructor with immutable metadata.

Trait Implementations§

Source§

impl<S> Clone for DynamicListVariableSlot<S>

Source§

fn clone(&self) -> DynamicListVariableSlot<S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S> Debug for DynamicListVariableSlot<S>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<S> Eq for DynamicListVariableSlot<S>

Source§

impl<S> PartialEq for DynamicListVariableSlot<S>

Source§

fn eq(&self, other: &DynamicListVariableSlot<S>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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