Enum mcvm_parse::Value
source · pub enum Value {
None,
Constant(String),
Var(String),
}Expand description
Argument to a command that could be constant or a variable
Variants§
Implementations§
source§impl Value
impl Value
sourcepub fn substitute_tokens(string: &str, vars: &HashMap<String, String>) -> String
pub fn substitute_tokens(string: &str, vars: &HashMap<String, String>) -> String
Replace substitution tokens in a string with variable values
Trait Implementations§
source§impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
impl Eq for Value
impl StructuralEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin 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