Skip to main content

Dir

Trait Dir 

Source
pub trait Dir: Table {
    // Required methods
    fn mkdir(&self, cx: &mut Cx, name: Symbol) -> Result<Value>;
    fn opendir(&self, cx: &mut Cx, name: Symbol) -> Result<Option<Value>>;
    fn rmdir(&self, cx: &mut Cx, name: Symbol) -> Result<Value>;
    fn is_dir(&self, cx: &mut Cx, name: Symbol) -> Result<bool>;
}
Expand description

Hierarchical table surface for backends that support nested subtables.

Required Methods§

Source

fn mkdir(&self, cx: &mut Cx, name: Symbol) -> Result<Value>

Creates a nested subtable under name, returning it.

Source

fn opendir(&self, cx: &mut Cx, name: Symbol) -> Result<Option<Value>>

Opens the subtable at name, or Ok(None) when absent.

Source

fn rmdir(&self, cx: &mut Cx, name: Symbol) -> Result<Value>

Removes the subtable at name, returning it.

Source

fn is_dir(&self, cx: &mut Cx, name: Symbol) -> Result<bool>

Whether name resolves to a subtable.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§