Trait mail_template::PathRebaseable
source · pub trait PathRebaseable {
fn rebase_to_include_base_dir(
&mut self,
base_dir: impl AsRef<Path>
) -> Result<(), UnsupportedPathError>;
fn rebase_to_exclude_base_dir(
&mut self,
base_dir: impl AsRef<Path>
) -> Result<(), UnsupportedPathError>;
}Required Methods
sourcefn rebase_to_include_base_dir(
&mut self,
base_dir: impl AsRef<Path>
) -> Result<(), UnsupportedPathError>
fn rebase_to_include_base_dir(
&mut self,
base_dir: impl AsRef<Path>
) -> Result<(), UnsupportedPathError>
Prefixes path in the type with base_dir.
Error
Some implementors might not support all paths.
For example a implementor requiring rust string
compatible paths might return a
Err(UnsupportedPathError::new("utf-8")).
sourcefn rebase_to_exclude_base_dir(
&mut self,
base_dir: impl AsRef<Path>
) -> Result<(), UnsupportedPathError>
fn rebase_to_exclude_base_dir(
&mut self,
base_dir: impl AsRef<Path>
) -> Result<(), UnsupportedPathError>
Removes the base_dir prefix.
Error
Some implementors might not support all paths.
For example a implementor requiring rust string
compatible paths might return a
Err(UnsupportedPathError::new("utf-8")).