Trait stam::AssociatedFile

source ·
pub trait AssociatedFile: Configurable + Sealed {
    // Required methods
    fn filename(&self) -> Option<&str>;
    fn set_filename(&mut self, filename: &str) -> &mut Self;

    // Provided methods
    fn with_filename(self, filename: &str) -> Self
       where Self: Sized { ... }
    fn filename_without_extension(&self) -> Option<&str> { ... }
    fn filename_without_workdir(&self) -> Option<&str> { ... }
}

Required Methods§

source

fn filename(&self) -> Option<&str>

source

fn set_filename(&mut self, filename: &str) -> &mut Self

Provided Methods§

source

fn with_filename(self, filename: &str) -> Selfwhere Self: Sized,

source

fn filename_without_extension(&self) -> Option<&str>

Returns the filename without (known!) extension. The extension must be a known extension used by STAM for this to work.

source

fn filename_without_workdir(&self) -> Option<&str>

Serializes the filename ready for use with STAM JSON’s @include or STAM CSV. It basically only strips the workdir component, if any.

Implementors§