pub struct Registry {
pub version: u64,
pub hives: HashMap<String, Hive>,
}Expand description
A versioned registry of all hives, boxes, and frames in the system.
Fields§
§version: u64Monotonically increasing version number.
hives: HashMap<String, Hive>All hives in the registry.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn with_version(version: u64) -> Self
pub fn with_version(version: u64) -> Self
Create a registry with a specific version.
Sourcepub fn next_version(&self) -> u64
pub fn next_version(&self) -> u64
Get the next version number.
Sourcepub fn get_hive_mut(&mut self, hive_name: &str) -> Option<&mut Hive>
pub fn get_hive_mut(&mut self, hive_name: &str) -> Option<&mut Hive>
Get a mutable reference to a hive.
Sourcepub fn has_box(&self, hive_name: &str, box_name: &str) -> bool
pub fn has_box(&self, hive_name: &str, box_name: &str) -> bool
Check if a box exists within a hive.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Registry
impl<'de> Deserialize<'de> for Registry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Registry
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more