pub enum Bind<V = (), F = V> {
Var(V),
Fun(F),
}
Expand description
Argument of a definition, such as $v
or f
in def foo($v; f): ...
.
In jq, we can bind filters in three different ways:
f as $x | ...
def g($x): ...; g(f)
def g(fx): ...; g(f)
In the first two cases, we bind the outputs of f
to a variable $x
.
In the third case, we bind f
to a filter fx
When writing a native filter, this is used to declare its arguments.
It is passed to compile::Compiler::with_funs
.
Variants§
Trait Implementations§
impl<V: Eq, F: Eq> Eq for Bind<V, F>
impl<V, F> StructuralPartialEq for Bind<V, F>
Auto Trait Implementations§
impl<V, F> Freeze for Bind<V, F>
impl<V, F> RefUnwindSafe for Bind<V, F>where
V: RefUnwindSafe,
F: RefUnwindSafe,
impl<V, F> Send for Bind<V, F>
impl<V, F> Sync for Bind<V, F>
impl<V, F> Unpin for Bind<V, F>
impl<V, F> UnwindSafe for Bind<V, F>where
V: UnwindSafe,
F: 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