pub struct Compiler<S, F> { /* private fields */ }Expand description
jq program compiler.
This contains strings of type S and native functions of type F.
Implementations§
Source§impl<'s, F> Compiler<&'s str, F>
impl<'s, F> Compiler<&'s str, F>
Sourcepub fn with_funs(
self,
funs: impl IntoIterator<Item = (&'s str, Box<[Arg]>, F)>,
) -> Self
pub fn with_funs( self, funs: impl IntoIterator<Item = (&'s str, Box<[Arg]>, F)>, ) -> Self
Supply functions with given signatures.
Sourcepub fn with_global_vars(
self,
global_vars: impl IntoIterator<Item = &'s str>,
) -> Self
pub fn with_global_vars( self, global_vars: impl IntoIterator<Item = &'s str>, ) -> Self
Assume the existence of global variables with given names.
The names all have to start with $.
For execution, the corresponding values have to be provided via crate::Ctx::new.
Trait Implementations§
Auto Trait Implementations§
impl<S, F> Freeze for Compiler<S, F>
impl<S, F> RefUnwindSafe for Compiler<S, F>where
Lut<(Sig<S>, F)>: RefUnwindSafe,
Vec<Vec<(Sig<S>, TermId, BTreeSet<TermId>)>>: RefUnwindSafe,
Vec<(usize, S)>: RefUnwindSafe,
Vec<S>: RefUnwindSafe,
Vec<(S, usize)>: RefUnwindSafe,
Locals<S>: RefUnwindSafe,
Vec<(S, Undefined)>: RefUnwindSafe,
impl<S, F> Send for Compiler<S, F>
impl<S, F> Sync for Compiler<S, F>
impl<S, F> Unpin for Compiler<S, F>
impl<S, F> UnsafeUnpin for Compiler<S, F>where
Lut<(Sig<S>, F)>: UnsafeUnpin,
Vec<Vec<(Sig<S>, TermId, BTreeSet<TermId>)>>: UnsafeUnpin,
Vec<(usize, S)>: UnsafeUnpin,
Vec<S>: UnsafeUnpin,
Vec<(S, usize)>: UnsafeUnpin,
Locals<S>: UnsafeUnpin,
Vec<(S, Undefined)>: UnsafeUnpin,
impl<S, F> UnwindSafe for Compiler<S, F>where
Lut<(Sig<S>, F)>: UnwindSafe,
Vec<Vec<(Sig<S>, TermId, BTreeSet<TermId>)>>: UnwindSafe,
Vec<(usize, S)>: UnwindSafe,
Vec<S>: UnwindSafe,
Vec<(S, usize)>: UnwindSafe,
Locals<S>: UnwindSafe,
Vec<(S, Undefined)>: UnwindSafe,
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