Trait optra::Operation
[−]
[src]
pub trait Operation: Debug + Clone { fn get_position(&self) -> u64; fn get_increment(&self) -> i64; fn get_timestamp(&self) -> u32; fn set_timestamp(&mut self, new_timestamp: u32); }
An operation that will make a change to a file.
Required Methods
fn get_position(&self) -> u64
Gets the position this operation will be perfomed at
fn get_increment(&self) -> i64
Gets the size change this operation will perform. For insert operations, it's the length of the data they will insert. For delete operations, it's the length of the data they will delete
fn get_timestamp(&self) -> u32
Gets the current local timestamp of this operation
fn set_timestamp(&mut self, new_timestamp: u32)
Sets the local timestamp of this operation
Implementors
impl Operation for InsertOperation
impl Operation for DeleteOperation