pub struct Handle { /* private fields */ }Expand description
RAII wrapper around da_handle. Tracks the algorithm and precision
chosen at construction time.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn new_double(kind: HandleKind) -> Result<Self>
pub fn new_double(kind: HandleKind) -> Result<Self>
Create an f64 handle for the given algorithm.
Sourcepub fn new_single(kind: HandleKind) -> Result<Self>
pub fn new_single(kind: HandleKind) -> Result<Self>
Create an f32 handle.
Sourcepub fn set_int_option(&mut self, name: &str, value: i64) -> Result<()>
pub fn set_int_option(&mut self, name: &str, value: i64) -> Result<()>
Set an integer-valued option.
Sourcepub fn set_string_option(&mut self, name: &str, value: &str) -> Result<()>
pub fn set_string_option(&mut self, name: &str, value: &str) -> Result<()>
Set a string-valued option.
Sourcepub fn as_raw(&self) -> da_handle
pub fn as_raw(&self) -> da_handle
Borrow the raw handle for routines this crate doesn’t yet wrap.
Sourcepub fn info(&self) -> (HandleKind, Precision)
pub fn info(&self) -> (HandleKind, Precision)
Returns (kind, precision).
Sourcepub fn last_error_message(&self) -> Option<String>
pub fn last_error_message(&self) -> Option<String>
Fetch the most recent detailed error message AOCL-DA stored on
this handle, or None if there isn’t one. Useful for diagnosing
which option or input value the C library found objectionable.
Trait Implementations§
Auto Trait Implementations§
impl !Sync for Handle
impl Forget for Handle
impl Freeze for Handle
impl Move for Handle
impl RefUnwindSafe for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl UnwindSafe for Handle
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