Release 0.5.1
Test / test (push) Successful in 58s
Publish release / publish (push) Successful in 3m2s

This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-28 17:48:37 +02:00
parent 68471969b5
commit 6ee6551400
7 changed files with 71 additions and 18 deletions
+20 -6
View File
@@ -348,15 +348,29 @@ pub struct SelfTransition {
/// with a case for as long as it runs, not only on the day they
/// sent it: an applicant written to for a missing drawing answers
/// from `incomplete`, and may withdraw from anywhere along the
/// way. Defaults to the initial state alone, which is what every
/// one-shot "unsubscribe" link wants and what this was before it
/// could be said.
#[serde(default = "initial_state_only")]
/// way.
///
/// Empty means the bucket's own initial state, which is the
/// one-shot "confirm" or "unsubscribe" link every one of these was
/// before it could say otherwise. Its own initial state, not the
/// word `open`: a bucket whose records start at `pending` has a
/// confirmation link that fires from `pending`, and reading the
/// literal here is what made redoal's watch-confirm button a rule
/// the engine would never match.
#[serde(default)]
pub from: Vec<String>,
}
fn initial_state_only() -> Vec<String> {
vec![crate::answers::OPEN_STATE.to_string()]
impl SelfTransition {
/// The states this move may be made from, with the bucket's
/// initial state standing in when the content named none.
pub fn from_states(&self, initial: &str) -> Vec<String> {
if self.from.is_empty() {
vec![initial.to_string()]
} else {
self.from.clone()
}
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]