Skip to main content

VariableDescriptor

Struct VariableDescriptor 

Source
pub struct VariableDescriptor {
Show 17 fields 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>, pub usize_getter: Option<UsizeGetter>, pub usize_setter: Option<UsizeSetter>, pub entity_value_provider: Option<UsizeEntityValueProvider>, pub candidate_values: Option<UsizeCandidateValues>, pub nearby_value_candidates: Option<UsizeCandidateValues>, pub nearby_entity_candidates: Option<UsizeCandidateValues>, pub nearby_value_distance_meter: Option<UsizeNearbyValueDistanceMeter>, pub nearby_entity_distance_meter: Option<UsizeNearbyEntityDistanceMeter>, pub construction_entity_order_key: Option<UsizeConstructionEntityOrderKey>, pub construction_value_order_key: Option<UsizeConstructionValueOrderKey>,
}

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>§usize_getter: Option<UsizeGetter>§usize_setter: Option<UsizeSetter>§entity_value_provider: Option<UsizeEntityValueProvider>§candidate_values: Option<UsizeCandidateValues>§nearby_value_candidates: Option<UsizeCandidateValues>§nearby_entity_candidates: Option<UsizeCandidateValues>§nearby_value_distance_meter: Option<UsizeNearbyValueDistanceMeter>§nearby_entity_distance_meter: Option<UsizeNearbyEntityDistanceMeter>§construction_entity_order_key: Option<UsizeConstructionEntityOrderKey>§construction_value_order_key: Option<UsizeConstructionValueOrderKey>

Implementations§

Source§

impl VariableDescriptor

Source

pub fn genuine(name: &'static str) -> Self

Source

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

Source

pub fn list(name: &'static str) -> Self

Source

pub fn shadow(name: &'static str, kind: ShadowVariableKind) -> Self

Source

pub fn with_value_range(self, provider: &'static str) -> Self

Source

pub fn with_allows_unassigned(self, allows: bool) -> Self

Source

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.

Source

pub fn with_value_range_type(self, value_range_type: ValueRangeType) -> Self

Source

pub fn with_source(self, entity: &'static str, variable: &'static str) -> Self

Source

pub fn with_usize_accessors( self, getter: UsizeGetter, setter: UsizeSetter, ) -> Self

Source

pub fn with_entity_value_provider( self, provider: UsizeEntityValueProvider, ) -> Self

Source

pub fn with_candidate_values(self, provider: UsizeCandidateValues) -> Self

Source

pub fn with_nearby_value_candidates( self, provider: UsizeCandidateValues, ) -> Self

Source

pub fn with_nearby_entity_candidates( self, provider: UsizeCandidateValues, ) -> Self

Source

pub fn with_nearby_value_distance_meter( self, meter: UsizeNearbyValueDistanceMeter, ) -> Self

Source

pub fn with_nearby_entity_distance_meter( self, meter: UsizeNearbyEntityDistanceMeter, ) -> Self

Source

pub fn with_construction_entity_order_key( self, order_key: UsizeConstructionEntityOrderKey, ) -> Self

Source

pub fn with_construction_value_order_key( self, order_key: UsizeConstructionValueOrderKey, ) -> Self

Trait Implementations§

Source§

impl Clone for VariableDescriptor

Source§

fn clone(&self) -> VariableDescriptor

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for VariableDescriptor

Source§

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

Formats the value using the given formatter. 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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.