pub enum SExprData<'a> {
Atom(&'a str),
String(&'a str),
List(&'a [SExpr]),
}
Expand description
The data contents of an SExpr
.
§Converting SExprData
to an Integer
There are a variety of Context::get_*
helper methods (such as for example
[Context::get_u8
] and [Context::get_i64
]) to parse integers out of
s-expressions. For example, 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 = ctx.get_u8(neg_one).unwrap();
assert_eq!(x, 0xff);
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SExprData<'a>
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