pub struct VariableDescriptor {
pub name: &'static str,
pub variable_type: VariableType,
pub allows_unassigned: bool,
pub value_range_provider: Option<&'static str>,
pub value_range_type: ValueRangeType,
pub source_variable: Option<&'static str>,
pub source_entity: Option<&'static str>,
}Fields§
§name: &'static str§variable_type: VariableType§allows_unassigned: bool§value_range_provider: Option<&'static str>§value_range_type: ValueRangeType§source_variable: Option<&'static str>§source_entity: Option<&'static str>Implementations§
Source§impl VariableDescriptor
impl VariableDescriptor
pub fn genuine(name: &'static str) -> Self
Sourcepub fn chained(name: &'static str) -> Self
pub fn chained(name: &'static str) -> Self
Creates a new chained variable descriptor.
Chained variables form chains rooted at anchor problem facts. For example, in vehicle routing: Vehicle ← Customer1 ← Customer2
pub fn list(name: &'static str) -> Self
pub fn shadow(name: &'static str, kind: ShadowVariableKind) -> Self
pub fn with_value_range(self, provider: &'static str) -> Self
pub fn with_allows_unassigned(self, allows: bool) -> Self
Sourcepub fn piggyback(name: &'static str, source_shadow: &'static str) -> Self
pub fn piggyback(name: &'static str, source_shadow: &'static str) -> Self
Creates a piggyback shadow variable descriptor.
Piggyback shadows ride on another shadow variable’s listener, updated as a side-effect without their own dedicated listener.
pub fn with_value_range_type(self, value_range_type: ValueRangeType) -> Self
pub fn with_source(self, entity: &'static str, variable: &'static str) -> Self
Trait Implementations§
Source§impl Clone for VariableDescriptor
impl Clone for VariableDescriptor
Source§fn clone(&self) -> VariableDescriptor
fn clone(&self) -> VariableDescriptor
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 VariableDescriptor
impl RefUnwindSafe for VariableDescriptor
impl Send for VariableDescriptor
impl Sync for VariableDescriptor
impl Unpin for VariableDescriptor
impl UnsafeUnpin for VariableDescriptor
impl UnwindSafe for VariableDescriptor
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