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
S: RefUnwindSafe,
F: 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> UnwindSafe for Compiler<S, F>
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