Struct polysite::compiler::utils::GenericCompiler
source · pub struct GenericCompiler { /* private fields */ }
Expand description
Generic compiler You can create new compiler using this.
Implementations§
source§impl GenericCompiler
impl GenericCompiler
pub fn empty() -> Self
sourcepub fn from<F: CompileFunction + 'static>(f: F) -> Self
pub fn from<F: CompileFunction + 'static>(f: F) -> Self
Create compiler from closure which implements CompileFunction
.
§Example
use polysite::{compiler::utils::GenericCompiler, *};
GenericCompiler::from(|ctx| compile!({ Ok(ctx) }));
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GenericCompiler
impl Send for GenericCompiler
impl Sync for GenericCompiler
impl Unpin for GenericCompiler
impl !UnwindSafe for GenericCompiler
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