pub enum VolumeScope {
DataDir {
tag: String,
path: String,
},
Process {
tag: String,
pid: u32,
},
}Expand description
Which lifetime a fakecloud process’s container volumes are tied to.
Variants§
Implementations§
Source§impl VolumeScope
impl VolumeScope
Sourcepub fn for_data_dir(path: &Path) -> Result<Self>
pub fn for_data_dir(path: &Path) -> Result<Self>
Scope for a persistent data directory: a hash of its canonical path and the id stored in it (minted on first use). Fails if the directory can’t be read or written, since naming volumes for a scope the next start can’t recover would orphan them.
Sourcepub fn for_process() -> Self
pub fn for_process() -> Self
Scope for a memory-mode process. The tag is random, so a later process that happens to reuse this PID never reattaches a volume the reaper hasn’t removed yet.
pub fn tag(&self) -> &str
Trait Implementations§
Source§impl Clone for VolumeScope
impl Clone for VolumeScope
Source§impl Debug for VolumeScope
impl Debug for VolumeScope
impl Eq for VolumeScope
Source§impl PartialEq for VolumeScope
impl PartialEq for VolumeScope
impl StructuralPartialEq for VolumeScope
Auto Trait Implementations§
impl Freeze for VolumeScope
impl RefUnwindSafe for VolumeScope
impl Send for VolumeScope
impl Sync for VolumeScope
impl Unpin for VolumeScope
impl UnsafeUnpin for VolumeScope
impl UnwindSafe for VolumeScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.