pub struct RandMeta {
pub rand_mode: Vec<bool>,
pub leaf_off: Vec<(usize, u32)>,
pub leaf_on: Vec<(usize, u32)>,
}Expand description
Per-object rand/randc metadata (LRM §18.4, §18.8): the rand_mode()
on/off state of each rand/randc property, in the order
register_rand_props listed them (base-class properties first). Every
object starts with all of them true – LRM 18.8: “Initially, all
rand variables are active”. What is rand and what is randc is the
template’s (rand_props); this vector is the only mutable part, so the
constraints plan’s randomize() and obj.x.rand_mode(0) read/write it
here without a second per-object side table.
Fields§
§rand_mode: Vec<bool>rand_mode[i] is whether the template’s ith RandProp is active.
leaf_off: Vec<(usize, u32)>Individual elements of a fixed-size array property switched off by
obj.a[i].rand_mode(0) (LRM 18.8: “random_variable can specify
individual elements using the corresponding index”), as (index into rand_mode, bit offset of the element within the property) pairs. Empty
(the common case) costs nothing: a solve only rewrites its program when
one is present.
leaf_on: Vec<(usize, u32)>The converse of Self::leaf_off: elements switched back on alone
(obj.a[i].rand_mode(1)) while their array property is off, same pair
encoding. A pair here is a deviation from the property’s mode, so it only
exists while that mode is off (LRM 18.8: a whole-property call sets every
element too, which clears both lists for it).
Trait Implementations§
impl Eq for RandMeta
impl StructuralPartialEq for RandMeta
Auto Trait Implementations§
impl Freeze for RandMeta
impl RefUnwindSafe for RandMeta
impl Send for RandMeta
impl Sync for RandMeta
impl Unpin for RandMeta
impl UnsafeUnpin for RandMeta
impl UnwindSafe for RandMeta
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.