Skip to main content

CustomRockLayout

Trait CustomRockLayout 

Source
pub trait CustomRockLayout:
    Debug
    + Send
    + Sync {
    // Required methods
    fn apply_layout(
        &self,
        tree: &Tree,
        package: &LockedPackageSpec,
    ) -> Result<()>;
    fn remove_layout(
        &self,
        tree: &Tree,
        package: &LockedPackageSpec,
    ) -> Result<()>;

    // Provided method
    fn layout_dependencies(&self) -> bool { ... }
}
Expand description

A custom layout for installed packages, applied in addition to the standard tree layout.

Required Methods§

Source

fn apply_layout(&self, tree: &Tree, package: &LockedPackageSpec) -> Result<()>

Arrange the package’s files where external tools expect them.

Source

fn remove_layout(&self, tree: &Tree, package: &LockedPackageSpec) -> Result<()>

Remove the files arranged by Self::apply_layout.

Provided Methods§

Source

fn layout_dependencies(&self) -> bool

Whether the layout applies to dependency packages, not just entrypoints.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§