Skip to main content

AmplExports

Struct AmplExports 

Source
#[repr(C)]
pub struct AmplExports {
Show 58 fields pub std_err: *mut c_void, pub addfunc: Option<unsafe extern "C" fn(*const i8, unsafe extern "C" fn(*mut Arglist) -> f64, i32, i32, *mut c_void, *mut AmplExports)>, pub asl_date: i64, pub fprintf: *mut c_void, pub printf: *mut c_void, pub sprintf: *mut c_void, pub vfprintf: *mut c_void, pub vsprintf: *mut c_void, pub strtod: *mut c_void, pub crypto: *mut c_void, pub asl: *mut i8, pub at_exit: *mut c_void, pub at_reset: Option<unsafe extern "C" fn(*mut AmplExports, *mut c_void, *mut c_void)>, pub tempmem: *mut c_void, pub add_table_handler: *mut c_void, pub private_ae: *mut i8, pub qsortv: *mut c_void, pub std_in: *mut c_void, pub std_out: *mut c_void, pub clearerr: *mut c_void, pub fclose: *mut c_void, pub fdopen: *mut c_void, pub feof: *mut c_void, pub ferror: *mut c_void, pub fflush: *mut c_void, pub fgetc: *mut c_void, pub fgets: *mut c_void, pub fileno: *mut c_void, pub fopen: *mut c_void, pub fputc: *mut c_void, pub fputs: *mut c_void, pub fread: *mut c_void, pub freopen: *mut c_void, pub fscanf: *mut c_void, pub fseek: *mut c_void, pub ftell: *mut c_void, pub fwrite: *mut c_void, pub pclose: *mut c_void, pub perror: *mut c_void, pub popen: *mut c_void, pub puts: *mut c_void, pub rewind: *mut c_void, pub scanf: *mut c_void, pub setbuf: *mut c_void, pub setvbuf: *mut c_void, pub sscanf: *mut c_void, pub tempnam: *mut c_void, pub tmpfile: *mut c_void, pub tmpnam: *mut c_void, pub ungetc: *mut c_void, pub ai: *mut c_void, pub getenv: *mut c_void, pub breakfunc: *mut c_void, pub breakarg: *mut i8, pub snprintf: *mut c_void, pub vsnprintf: *mut c_void, pub addrand: *mut c_void, pub addrandinit: Option<unsafe extern "C" fn(*mut AmplExports, unsafe extern "C" fn(*mut c_void, u64), *mut c_void)>,
}
Expand description

The AmplExports struct from AMPL’s funcadd.h. Layout must match exactly. Function pointers we don’t implement are held as *mut c_void (null) — AMPL’s ABI does not require a caller to populate them unless the loaded library actually invokes them.

Fields§

§std_err: *mut c_void§addfunc: Option<unsafe extern "C" fn(*const i8, unsafe extern "C" fn(*mut Arglist) -> f64, i32, i32, *mut c_void, *mut AmplExports)>§asl_date: i64§fprintf: *mut c_void§printf: *mut c_void§sprintf: *mut c_void§vfprintf: *mut c_void§vsprintf: *mut c_void§strtod: *mut c_void§crypto: *mut c_void§asl: *mut i8§at_exit: *mut c_void§at_reset: Option<unsafe extern "C" fn(*mut AmplExports, *mut c_void, *mut c_void)>§tempmem: *mut c_void§add_table_handler: *mut c_void§private_ae: *mut i8§qsortv: *mut c_void§std_in: *mut c_void§std_out: *mut c_void§clearerr: *mut c_void§fclose: *mut c_void§fdopen: *mut c_void§feof: *mut c_void§ferror: *mut c_void§fflush: *mut c_void§fgetc: *mut c_void§fgets: *mut c_void§fileno: *mut c_void§fopen: *mut c_void§fputc: *mut c_void§fputs: *mut c_void§fread: *mut c_void§freopen: *mut c_void§fscanf: *mut c_void§fseek: *mut c_void§ftell: *mut c_void§fwrite: *mut c_void§pclose: *mut c_void§perror: *mut c_void§popen: *mut c_void§puts: *mut c_void§rewind: *mut c_void§scanf: *mut c_void§setbuf: *mut c_void§setvbuf: *mut c_void§sscanf: *mut c_void§tempnam: *mut c_void§tmpfile: *mut c_void§tmpnam: *mut c_void§ungetc: *mut c_void§ai: *mut c_void§getenv: *mut c_void§breakfunc: *mut c_void§breakarg: *mut i8§snprintf: *mut c_void§vsnprintf: *mut c_void§addrand: *mut c_void§addrandinit: Option<unsafe extern "C" fn(*mut AmplExports, unsafe extern "C" fn(*mut c_void, u64), *mut c_void)>

Trait Implementations§

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> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more