pub struct Directory(/* private fields */);
Expand description
Represents an open directory on disk.
Do NOT drop this object! It doesn’t hold a reference to the Volume Manager it was created from and if you drop it, the VolumeManager will think you still have the directory open, and it won’t let you open the directory again.
Instead you must pass it to [crate::VolumeManager::close_dir
] to close it
cleanly.
If you want your directories to close themselves on drop, create your own
Directory
type that wraps this one and also holds a VolumeManager
reference. You’ll then also need to put your VolumeManager
in some kind of
Mutex or RefCell, and deal with the fact you can’t put them both in the same
struct any more because one refers to the other. Basically, it’s complicated
and there’s a reason we did it this way.
Trait Implementations§
impl Copy for Directory
impl Eq for Directory
impl StructuralPartialEq for Directory
Auto Trait Implementations§
impl Freeze for Directory
impl RefUnwindSafe for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnwindSafe for Directory
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.