Parse a family from its storage key segment; `None` for an unknown one.
(s: &str)
| 102 | |
| 103 | /// Parse a family from its storage key segment; `None` for an unknown one. |
| 104 | pub fn from_segment(s: &str) -> Option<Self> { |
| 105 | match s { |
| 106 | "changes" => Some(ObjectFamily::Change), |
| 107 | "tags" => Some(ObjectFamily::Tag), |
| 108 | "provenance" => Some(ObjectFamily::Provenance), |
| 109 | "attest" => Some(ObjectFamily::Attest), |
| 110 | "views" => Some(ObjectFamily::View), |
| 111 | "conflicts" => Some(ObjectFamily::Conflict), |
| 112 | _ => None, |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | /// Every family, for iteration (inventory scans, closure walks). |
| 117 | pub fn all() -> [ObjectFamily; 6] { |
nothing calls this directly
no outgoing calls
no test coverage detected