chore(frontend): expose literal method in MainPod builder + more op macros (#127)

* Expose literal builder method

* Add additional macros
This commit is contained in:
Ahmad Afuni 2025-03-12 23:30:11 +10:00 committed by GitHub
parent 12ec220de6
commit abce0af675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 127 additions and 133 deletions

View file

@ -56,6 +56,18 @@ impl From<(&SignedPod, &str)> for OperationArg {
}
}
impl From<Statement> for OperationArg {
fn from(s: Statement) -> Self {
Self::Statement(s)
}
}
impl<V: Into<Value>> From<(&str, V)> for OperationArg {
fn from((key, value): (&str, V)) -> Self {
Self::Entry(key.to_string(), value.into())
}
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Operation(pub OperationType, pub Vec<OperationArg>);