pub enum Arg<V = String, 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
Variants§
Implementations§
Trait Implementations§
source§impl<'de, V, F> Deserialize<'de> for Arg<V, F>where
V: Deserialize<'de>,
F: Deserialize<'de>,
impl<'de, V, F> Deserialize<'de> for Arg<V, F>where
V: Deserialize<'de>,
F: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<V: PartialEq, F: PartialEq> PartialEq for Arg<V, F>
impl<V: PartialEq, F: PartialEq> PartialEq for Arg<V, F>
impl<V: Eq, F: Eq> Eq for Arg<V, F>
impl<V, F> StructuralEq for Arg<V, F>
impl<V, F> StructuralPartialEq for Arg<V, F>
Auto Trait Implementations§
impl<V, F> RefUnwindSafe for Arg<V, F>where
F: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, F> Send for Arg<V, F>
impl<V, F> Sync for Arg<V, F>
impl<V, F> Unpin for Arg<V, F>
impl<V, F> UnwindSafe for Arg<V, F>where
F: UnwindSafe,
V: 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