Convert from a raw u8 value. Returns `None` if the value is not a valid `ViewScope`.
(value: u8)
| 456 | /// |
| 457 | /// Returns `None` if the value is not a valid `ViewScope`. |
| 458 | pub fn from_u8(value: u8) -> Option<Self> { |
| 459 | match value { |
| 460 | 0 => Some(Self::Draft), |
| 461 | 1 => Some(Self::Shared), |
| 462 | _ => None, |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | impl std::fmt::Display for ViewScope { |
nothing calls this directly
no outgoing calls
no test coverage detected