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 strImplementations§
Source§impl<S> DynamicListVariableSlot<S>
impl<S> DynamicListVariableSlot<S>
Sourcepub 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>
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.
Sourcepub 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>
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.
Sourcepub fn with_metadata(
self,
metadata: Arc<dyn DynamicListMetadata<S>>,
) -> Result<DynamicListVariableSlot<S>, String>
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.
pub fn resolve_descriptor_index( &mut self, descriptor: &SolutionDescriptor, ) -> Result<(), String>
pub fn resolved_against( self, descriptor: &SolutionDescriptor, ) -> Result<DynamicListVariableSlot<S>, String>
pub fn is_descriptor_resolved(&self) -> bool
pub fn descriptor_index(&self) -> usize
pub fn descriptor_variable_index(&self) -> usize
pub fn matches_target( &self, entity_class: Option<&str>, variable_name: Option<&str>, ) -> bool
pub fn entity_count(&self, solution: &S) -> usize
pub fn element_count(&self, solution: &S) -> usize
pub fn element(&self, solution: &S, element_index: usize) -> Option<usize>
pub fn assigned_elements(&self, solution: &S) -> Vec<usize>
pub fn list_len(&self, solution: &S, row: usize) -> usize
pub fn list_get(&self, solution: &S, row: usize, pos: usize) -> Option<usize>
pub fn list_insert( &self, solution: &mut S, row: usize, pos: usize, value: usize, )
pub fn list_remove( &self, solution: &mut S, row: usize, pos: usize, ) -> Option<usize>
pub fn access_capabilities(&self) -> DynamicListAccessCapabilities
pub fn list_set( &self, solution: &mut S, row: usize, pos: usize, value: usize, ) -> bool
Sourcepub fn list_replace(
&self,
solution: &mut S,
row: usize,
values: Vec<usize>,
) -> bool
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.
pub fn list_reverse( &self, solution: &mut S, row: usize, start: usize, end: usize, ) -> bool
pub fn sublist_remove( &self, solution: &mut S, row: usize, start: usize, end: usize, ) -> Option<Vec<usize>>
pub fn sublist_insert( &self, solution: &mut S, row: usize, pos: usize, values: Vec<usize>, ) -> bool
Sourcepub fn metadata(&self) -> Option<&dyn DynamicListMetadata<S>>
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.
pub fn metadata_capabilities(&self) -> Option<DynamicListMetadataCapabilities>
pub fn require_metadata(&self) -> Result<&dyn DynamicListMetadata<S>, String>
Source§impl<S> DynamicListVariableSlot<S>where
S: DynamicModelBackend,
impl<S> DynamicListVariableSlot<S>where
S: DynamicModelBackend,
pub fn new( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, ) -> DynamicListVariableSlot<S>
Sourcepub 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>
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>
impl<S> Clone for DynamicListVariableSlot<S>
Source§fn clone(&self) -> DynamicListVariableSlot<S>
fn clone(&self) -> DynamicListVariableSlot<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<S> Debug for DynamicListVariableSlot<S>
impl<S> Debug for DynamicListVariableSlot<S>
impl<S> Eq for DynamicListVariableSlot<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for DynamicListVariableSlot<S>
impl<S> !UnwindSafe for DynamicListVariableSlot<S>
impl<S> Freeze for DynamicListVariableSlot<S>
impl<S> Send for DynamicListVariableSlot<S>
impl<S> Sync for DynamicListVariableSlot<S>
impl<S> Unpin for DynamicListVariableSlot<S>
impl<S> UnsafeUnpin for DynamicListVariableSlot<S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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