Struct futhark_bindgen::OCaml

source ·
pub struct OCaml { /* private fields */ }
Expand description

OCaml codegen

Implementations§

source§

impl OCaml

source

pub fn new(config: &Config) -> Result<Self, Error>

Create new OCaml codegen instance

Trait Implementations§

source§

impl Generate for OCaml

source§

fn bindings(&mut self, pkg: &Package, config: &mut Config) -> Result<(), Error>

Step 1: generate any setup code or low-level bindings
source§

fn array_type( &mut self, _pkg: &Package, config: &mut Config, name: &str, ty: &ArrayType ) -> Result<(), Error>

Step 2: generate code for array types
source§

fn opaque_type( &mut self, _pkg: &Package, config: &mut Config, name: &str, ty: &OpaqueType ) -> Result<(), Error>

Step 3: generate code for opaque types
source§

fn entry( &mut self, _pkg: &Package, config: &mut Config, name: &str, entry: &Entry ) -> Result<(), Error>

Step 4: generate code for entry points
source§

fn generate(&mut self, pkg: &Package, config: &mut Config) -> Result<(), Error>

Iterates through the manifest and generates code
source§

fn format(&mut self, _output: &Path) -> Result<(), Error>

Step 5: Optionally, run any formatting program or post-processing on the output file

Auto Trait Implementations§

§

impl RefUnwindSafe for OCaml

§

impl Send for OCaml

§

impl Sync for OCaml

§

impl Unpin for OCaml

§

impl UnwindSafe for OCaml

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>,

§

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>,

§

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.