pub struct ValuePromotionRule {
pub from_domain: Symbol,
pub to_domain: Symbol,
pub cost: u16,
pub convert: fn(&mut Cx, Value) -> Result<Value>,
}Expand description
A value-level conversion edge from one number domain to another.
Fields§
§from_domain: SymbolDomain the rule converts from.
to_domain: SymbolDomain the rule converts to.
cost: u16Relative cost, used to rank competing promotion paths.
convert: fn(&mut Cx, Value) -> Result<Value>Converts a value in from_domain to one in to_domain.
Trait Implementations§
Source§impl Clone for ValuePromotionRule
impl Clone for ValuePromotionRule
Source§fn clone(&self) -> ValuePromotionRule
fn clone(&self) -> ValuePromotionRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValuePromotionRule
impl RefUnwindSafe for ValuePromotionRule
impl Send for ValuePromotionRule
impl Sync for ValuePromotionRule
impl Unpin for ValuePromotionRule
impl UnsafeUnpin for ValuePromotionRule
impl UnwindSafe for ValuePromotionRule
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