pub struct Cmajor { /* private fields */ }Expand description
The Cmajor library.
Implementations§
Source§impl Cmajor
impl Cmajor
Sourcepub fn new_from_path(
path_to_library: impl AsRef<Path>,
) -> Result<Self, LibraryError>
pub fn new_from_path( path_to_library: impl AsRef<Path>, ) -> Result<Self, LibraryError>
Load the Cmajor library at the given path.
Sourcepub fn new_from_env() -> Result<Self, LibraryError>
pub fn new_from_env() -> Result<Self, LibraryError>
Load the Cmajor library from the path specified at the CMAJOR_LIB_PATH environment variable.
Sourcepub fn parse(
&self,
cmajor_program: impl AsRef<str>,
) -> Result<Program, ParseError>
pub fn parse( &self, cmajor_program: impl AsRef<str>, ) -> Result<Program, ParseError>
Parse a Cmajor program.
Sourcepub fn engine_types(&self) -> impl Iterator<Item = EngineType> + '_
pub fn engine_types(&self) -> impl Iterator<Item = EngineType> + '_
Returns the available engine types.
Sourcepub fn create_default_engine(&self) -> EngineBuilder
pub fn create_default_engine(&self) -> EngineBuilder
Create the default engine type (LLVM JIT).
Sourcepub fn create_engine(&self, engine_type: EngineType) -> EngineBuilder
pub fn create_engine(&self, engine_type: EngineType) -> EngineBuilder
Create a new engine of the given type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cmajor
impl RefUnwindSafe for Cmajor
impl !Send for Cmajor
impl !Sync for Cmajor
impl Unpin for Cmajor
impl UnwindSafe for Cmajor
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