pub enum RecipeAttribute {
Bare(String),
Object(HashMap<String, Option<String>>),
}Expand description
Attribute attached to a recipe.
just --dump --dump-format json encodes recipe attributes in three shapes:
- Bare string for nullary attributes:
"private" - Object with string payload:
{"group": "allow-agent"} - Object with null payload (other unary):
{"confirm": null}
We model all three with an untagged enum so deserialization is total. Only
Group is consumed by current logic; the rest are preserved as Other
for forward compatibility.
Variants§
Bare(String)
Bare-string attribute, e.g. "private", "no-cd", "linux".
Object(HashMap<String, Option<String>>)
Object attribute, e.g. {"group": "allow-agent"} or {"confirm": null}.
Implementations§
Trait Implementations§
Source§impl Clone for RecipeAttribute
impl Clone for RecipeAttribute
Source§fn clone(&self) -> RecipeAttribute
fn clone(&self) -> RecipeAttribute
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecipeAttribute
impl Debug for RecipeAttribute
Source§impl<'de> Deserialize<'de> for RecipeAttribute
impl<'de> Deserialize<'de> for RecipeAttribute
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
Auto Trait Implementations§
impl Freeze for RecipeAttribute
impl RefUnwindSafe for RecipeAttribute
impl Send for RecipeAttribute
impl Sync for RecipeAttribute
impl Unpin for RecipeAttribute
impl UnsafeUnpin for RecipeAttribute
impl UnwindSafe for RecipeAttribute
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