pub struct FixedNumbersLib;Expand description
The library that installs every fixed-width integer domain (numbers/i8
through numbers/i128, numbers/u8 through numbers/u128, and the
pointer-width isize/usize): their literal classes and shapes, value
shapes, and the widening promotion edges through the integer lattice.
§Examples
use std::sync::Arc;
use sim_kernel::{Cx, DefaultFactory, NoopEvalPolicy};
use sim_lib_numbers_core::domains;
use sim_lib_numbers_fixed::FixedNumbersLib;
let mut cx = Cx::new(Arc::new(NoopEvalPolicy), Arc::new(DefaultFactory));
cx.load_lib(&FixedNumbersLib::new()).unwrap();
let edges = cx.registry().value_promotion_rules();
assert!(edges.iter().any(|rule| {
rule.from_domain == domains::i8() && rule.to_domain == domains::i16()
}));Implementations§
Trait Implementations§
Source§impl Default for FixedNumbersLib
impl Default for FixedNumbersLib
Auto Trait Implementations§
impl Freeze for FixedNumbersLib
impl RefUnwindSafe for FixedNumbersLib
impl Send for FixedNumbersLib
impl Sync for FixedNumbersLib
impl Unpin for FixedNumbersLib
impl UnsafeUnpin for FixedNumbersLib
impl UnwindSafe for FixedNumbersLib
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