Trait git_filter_server::Processor [−][src]
pub trait Processor { fn process<R: Read, W: Write>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_input: &mut R,
_output: &mut W
) -> Result<()> { ... } fn schedule_process<R: Read>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_input: &mut R
) -> Result<()> { ... } fn get_scheduled<W: Write>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_output: &mut W
) -> Result<()> { ... } fn switch_to_wait(&mut self) { ... } fn get_available(&mut self) -> Result<Vec<String>> { ... } fn should_delay(
&self,
_pathname: &str,
_process_type: ProcessingType
) -> bool { ... } fn supports_processing(&self, _process_type: ProcessingType) -> bool { ... } }
Expand description
This trait is used for user-defined logic of git-filter-server Typically git talks with processor via stdio, so better do not use it inside
Provided methods
Handle clean/smudge operation
fn schedule_process<R: Read>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_input: &mut R
) -> Result<()>
fn schedule_process<R: Read>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_input: &mut R
) -> Result<()>
Schedule delayed execution
fn get_scheduled<W: Write>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_output: &mut W
) -> Result<()>
fn get_scheduled<W: Write>(
&mut self,
_pathname: &str,
_process_type: ProcessingType,
_output: &mut W
) -> Result<()>
Get data for file, previously scheduled via schedule_process
fn switch_to_wait(&mut self)
fn switch_to_wait(&mut self)
Called once all files are already scheduled/processed
fn get_available(&mut self) -> Result<Vec<String>>
fn get_available(&mut self) -> Result<Vec<String>>
Get scheduled files ready for outputting
fn should_delay(&self, _pathname: &str, _process_type: ProcessingType) -> bool
fn should_delay(&self, _pathname: &str, _process_type: ProcessingType) -> bool
Should processing of file be delayed? Only use it for long-running tasks, i.e file downloading, which would be better parallelized
fn supports_processing(&self, _process_type: ProcessingType) -> bool
fn supports_processing(&self, _process_type: ProcessingType) -> bool
Does this filter supports clean/smudge?