pub enum Value {
Arg(usize),
Prop(String),
Func {
name: String,
args: Vec<FuncArg>,
},
Literal(String),
}Expand description
A substitutable value: #n, #name, &func(…), or literal text. Literal only
arises inside function arguments / attribute strings — never at content
position (a bare literal there is ReplacementOp::Text).
Variants§
Arg(usize)
#n (1..=9) — the n-th digested argument (1-based).
Prop(String)
#name — a named whatsit property.
Func
&func(args…) — a function call (resolved through a whitelist at runtime,
a Rust call at compile time).
Literal(String)
Literal text, already unquoted.
Trait Implementations§
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more