Trait crdt_fileset::FileUpdater
[−]
[src]
pub trait FileUpdater: Debug { type FileTransaction: Debug; fn create_file<P: AsRef<Path>>(&mut self, filename: P) -> Result<()>; fn remove_file<P: AsRef<Path>>(&mut self, filename: P) -> Result<()>; fn update_file<P: AsRef<Path>>(
&mut self,
filename: P,
timestamp_lookup: &BTreeMap<u32, (u32, u32)>,
transaction: &mut Self::FileTransaction
) -> Result<()>; fn move_file<P: AsRef<Path>>(
&mut self,
old_filename: P,
new_filename: P
) -> Result<()>; fn get_local_changes<P: AsRef<Path>>(
&mut self,
filename: P
) -> Result<(Self::FileTransaction, BTreeMap<u32, (u32, u32)>)>; fn get_changes_since<P: AsRef<Path>>(
&self,
filename: P,
last_timestamp: Option<(u32, u32)>
) -> Self::FileTransaction; fn get_base_path(&self) -> &Path; }
Associated Types
type FileTransaction: Debug
Required Methods
fn create_file<P: AsRef<Path>>(&mut self, filename: P) -> Result<()>
fn remove_file<P: AsRef<Path>>(&mut self, filename: P) -> Result<()>
fn update_file<P: AsRef<Path>>(
&mut self,
filename: P,
timestamp_lookup: &BTreeMap<u32, (u32, u32)>,
transaction: &mut Self::FileTransaction
) -> Result<()>
&mut self,
filename: P,
timestamp_lookup: &BTreeMap<u32, (u32, u32)>,
transaction: &mut Self::FileTransaction
) -> Result<()>
fn move_file<P: AsRef<Path>>(
&mut self,
old_filename: P,
new_filename: P
) -> Result<()>
&mut self,
old_filename: P,
new_filename: P
) -> Result<()>
fn get_local_changes<P: AsRef<Path>>(
&mut self,
filename: P
) -> Result<(Self::FileTransaction, BTreeMap<u32, (u32, u32)>)>
&mut self,
filename: P
) -> Result<(Self::FileTransaction, BTreeMap<u32, (u32, u32)>)>
fn get_changes_since<P: AsRef<Path>>(
&self,
filename: P,
last_timestamp: Option<(u32, u32)>
) -> Self::FileTransaction
&self,
filename: P,
last_timestamp: Option<(u32, u32)>
) -> Self::FileTransaction