Skip to main content

DirHandle

Trait DirHandle 

Source
pub trait DirHandle {
    // Required methods
    fn path(&self) -> &Path;
    fn try_close(&mut self) -> Result<(), VfError>;
    fn is_closed(&self) -> bool;
    fn close(self) -> Result<(), VfError>
       where Self: Sized;
}
Expand description

Owned directory retaining the opened object’s identity after rename or path replacement. Paths are diagnostic only; clients validate ownership and live state before handle-rooted operations. Failed try_close retains cleanup ownership.

Required Methods§

Source

fn path(&self) -> &Path

Diagnostic name captured at open, not current path or identity.

Source

fn try_close(&mut self) -> Result<(), VfError>

Close while retaining cleanup ownership on failure.

Source

fn is_closed(&self) -> bool

Local close ownership, not proof of remote liveness after failure.

Source

fn close(self) -> Result<(), VfError>
where Self: Sized,

Consuming close; on failure Drop queues best-effort cleanup.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§