Trait ProjectFile

Source
pub trait ProjectFile<'de, Data>
where Data: Serialize + Deserialize<'de>,
{ // Required method fn path(&self) -> PathBuf; // Provided methods fn base_path() -> PathBuf { ... } fn create(&self) -> Result<File, Box<dyn Error>> { ... } fn delete(&self) -> Result<(), Box<dyn Error>> { ... } fn open(&self) -> Result<File, Box<dyn Error>> { ... } fn write(&mut self, data: &Data) -> Result<(), Box<dyn Error>> { ... } fn read(&self) -> Result<ReadIn<Data>, Box<dyn Error>> { ... } }

Required Methods§

Source

fn path(&self) -> PathBuf

Provided Methods§

Source

fn base_path() -> PathBuf

Source

fn create(&self) -> Result<File, Box<dyn Error>>

Source

fn delete(&self) -> Result<(), Box<dyn Error>>

Source

fn open(&self) -> Result<File, Box<dyn Error>>

Source

fn write(&mut self, data: &Data) -> Result<(), Box<dyn Error>>

Source

fn read(&self) -> Result<ReadIn<Data>, Box<dyn Error>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'de, Data> ProjectFile<'de, Data> for NonTimestampedFile<Data>
where Data: Serialize + Deserialize<'de>,

Source§

impl<'de, Data> ProjectFile<'de, Data> for TimestampedFile<Data>
where Data: Serialize + Deserialize<'de>,