Skip to main content

Layoutable

Trait Layoutable 

Source
pub trait Layoutable<L: Layout> {
    // Required methods
    fn layout(&self) -> &L;
    fn root_path(&self) -> &Path;

    // Provided methods
    fn get_resource(&self, resource: L::Resource) -> Option<PathBuf> { ... }
    fn try_get_resource(&self, resource: L::Resource) -> Result<PathBuf>
       where L::Resource: Debug { ... }
    fn get_existing_resource(&self, resource: L::Resource) -> Option<PathBuf> { ... }
    fn get_extended_resource(
        &self,
        resource: L::ExtendedResource,
    ) -> Option<PathBuf> { ... }
    fn try_get_extended_resource(
        &self,
        resource: L::ExtendedResource,
    ) -> Result<PathBuf>
       where L::ExtendedResource: Debug { ... }
}

Required Methods§

Source

fn layout(&self) -> &L

Source

fn root_path(&self) -> &Path

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<L: Layout, P> Layoutable<L> for Storage<L, P>