(info: &atomic_repository::ViewInfo, current: bool)
| 679 | |
| 680 | impl JsonView { |
| 681 | pub(crate) fn from_local(info: &atomic_repository::ViewInfo, current: bool) -> Self { |
| 682 | Self { |
| 683 | name: info.name.clone(), |
| 684 | current, |
| 685 | scope: info.kind_label().to_string(), |
| 686 | parent: info.parent_name.clone(), |
| 687 | change_count: info |
| 688 | .own_change_count |
| 689 | .saturating_add(info.inherited_change_count), |
| 690 | own_change_count: Some(info.own_change_count), |
| 691 | inherited_change_count: Some(info.inherited_change_count), |
| 692 | state: Some(info.state_base32()), |
| 693 | set_id: None, |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | /// One view off the wire's ViewInfo — the routed twin of |
| 698 | /// [`JsonView::from_local`]: the handler classifies own/inherited |
nothing calls this directly
no test coverage detected