Create a new shared view state with the given name and no parent. This is the default constructor for backward compatibility. New code should prefer [`ViewState::with_scope`] for explicit scope/parent. # Example ``` use atomic_core::pristine::ViewState; let view = ViewState::new(1, "main".to_string()); assert_eq!(view.id, 1); assert_eq!(view.name, "main"); assert_eq!(view.change_count, 0); ass
(id: u64, name: String)
| 589 | /// assert!(view.parent.is_none()); |
| 590 | /// ``` |
| 591 | pub fn new(id: u64, name: String) -> Self { |
| 592 | Self { |
| 593 | id, |
| 594 | name, |
| 595 | state: Merkle::ZERO, |
| 596 | change_count: 0, |
| 597 | kind: ViewScope::Shared, |
| 598 | parent: None, |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | /// Create a new view with explicit scope and parent. |
| 603 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected