Struct Context

Source
pub struct Context {
    pub ptr: uintptr_t,
    pub should_free_on_drop: bool,
}
Expand description

Wraps isl_ctx.

Fields§

§ptr: uintptr_t§should_free_on_drop: bool

Implementations§

Source§

impl Context

Source

pub fn alloc() -> Context

Wraps isl_ctx_alloc.

Examples found in repository?
examples/hash_isl_set.rs (line 4)
3fn main() {
4    let ctx = isl::Context::alloc();
5    let set = isl::Set::read_from_str(&ctx, "{[i, j]: 0<=i<1024 and 0<=j<512}");
6    set.dump();
7    println!("set.get_hash() is {}.", set.get_hash());
8}
More examples
Hide additional examples
examples/hello_isl_basic_set.rs (line 4)
3fn main() {
4    let ctx = isl::Context::alloc();
5    let bset = isl::BasicSet::read_from_str(&ctx, "{[i, j]: 0<=i<1024 and 0<=j<512}");
6    bset.dump();
7    println!("Printed str is {}.", bset.to_str());
8}
Source

pub fn incref(&self)

Wraps isl_ctx_ref.

Source

pub fn deref(&self)

Wraps isl_ctx_deref.

Source

pub fn free(&self)

Wraps isl_ctx_free.

Source

pub fn abort(&self)

Wraps isl_ctx_abort.

Source

pub fn resume(&self)

Wraps isl_ctx_resume.

Source

pub fn aborted(&self) -> i32

Wraps isl_ctx_aborted.

Source

pub fn set_max_operations(&self, max_operations: u64)

Wraps isl_ctx_set_max_operations.

Source

pub fn get_max_operations(&self) -> u64

Wraps isl_ctx_get_max_operations.

Source

pub fn reset_operations(&self)

Wraps isl_ctx_reset_operations.

Source

pub fn last_error_msg(&self) -> &str

Wraps isl_ctx_last_error_msg.

Source

pub fn last_error_file(&self) -> &str

Wraps isl_ctx_last_error_file.

Source

pub fn last_error_line(&self) -> i32

Wraps isl_ctx_last_error_line.

Source

pub fn reset_error(&self)

Wraps isl_ctx_reset_error.

Source

pub fn do_not_free_on_drop(&mut self)

Does not call isl_xxx_free() on being dropped. (For internal use only.)

Trait Implementations§

Source§

impl Drop for Context

Source§

fn drop(&mut self)

Executes the destructor for this type. 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> 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, 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.