pub enum SExprData<'a> {
Atom(&'a str),
List(&'a [SExpr]),
}
Expand description
The data contents of an SExpr
.
Converting SExprData
to an Integer
There are TryFrom<SExprData>
implementations for common integer types that
you can use:
let mut ctx = easy_smt::ContextBuilder::new().build().unwrap();
let neg_one = ctx.binary(8, -1_i8);
assert_eq!(ctx.display(neg_one).to_string(), "#b11111111");
let x = u8::try_from(ctx.get(neg_one)).unwrap();
assert_eq!(x, 0xff);
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SExprData<'a>
impl<'a> Send for SExprData<'a>
impl<'a> Sync for SExprData<'a>
impl<'a> Unpin for SExprData<'a>
impl<'a> UnwindSafe for SExprData<'a>
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