distributed 4.3.0

CQRS/ES framework for Rust using Plain Old Rust Structs — append-only events, replay, snapshots, outbox, service bus, and pluggable infrastructure
Documentation
use super::{ProjectionChangeKind, ProjectionObservationKind};

impl ProjectionChangeKind {
    pub(crate) fn from_storage_str(value: &str) -> Option<Self> {
        match value {
            "checkpoint" => Some(Self::Checkpoint),
            "record_upsert" => Some(Self::RecordUpsert),
            "record_delete" => Some(Self::RecordDelete),
            "record_recreate" => Some(Self::RecordRecreate),
            "observation" => Some(Self::Observation),
            "failure" => Some(Self::Failure),
            _ => None,
        }
    }
}

impl ProjectionObservationKind {
    pub(crate) fn from_storage_str(value: &str) -> Option<Self> {
        match value {
            "record" => Some(Self::Record),
            "dependency" => Some(Self::Dependency),
            _ => None,
        }
    }
}