You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So one issue here is stopping people opening the same volume twice, but allowing all the objects to be stashed in a struct for later use (so they can't refer to each other).
Perhaps the VolumeManager can hold all the volumes internally and lend out &mut Volume references cheaply, but only for one Volume at a time. You could even const generic the number of Volumes a VolumeManager can hold (one is usually fine, but sometimes there's an EFI partition first or something). Then I think for opening files you can either get a File (which holds a &Volume) or a RawFile (which does not, but does hold some unique ID for the Volume so it'll panic if you use it with the wrong Volume in future).
Now that
critical-section
is a thing, maybe we can consider interior mutability:Volume
can hold an&VolumeManager
Directory
andFile
can hold an&Volume
The text was updated successfully, but these errors were encountered: