pub struct JsonProcess {
pub name: String,
pub json_items: String,
pub tmp_dir_path: Option<PathBuf>,
pub overwrite: bool,
pub items: Vec<Item>,
}
Expand description
The Process structure that parse Items from a JSON file.
Fields§
§name: String
§json_items: String
§tmp_dir_path: Option<PathBuf>
§overwrite: bool
§items: Vec<Item>
Trait Implementations§
Source§impl Debug for JsonProcess
impl Debug for JsonProcess
Source§impl Default for JsonProcess
impl Default for JsonProcess
Source§fn default() -> JsonProcess
fn default() -> JsonProcess
Returns the “default value” for a type. Read more
Source§impl ProcessingCore for JsonProcess
Implementation of the ProcessingCore trait for JsonProcess.
impl ProcessingCore for JsonProcess
Implementation of the ProcessingCore trait for JsonProcess.
Source§fn set_items(&mut self) -> Result<()>
fn set_items(&mut self) -> Result<()>
Set the Items by parsing the JSON file. This method also remove input paths that do not exist.
Source§fn process_items<F>(&self, f: F) -> Result<bool>
fn process_items<F>(&self, f: F) -> Result<bool>
Method that process all the Items.
fn check_tmp_dir_exist(&self) -> Result<bool>
fn check_all_inputs_exist(&self) -> Result<bool>
fn create_tmp_directory(&self) -> Result<()>
fn move_files(&self) -> Result<bool>
Auto Trait Implementations§
impl Freeze for JsonProcess
impl RefUnwindSafe for JsonProcess
impl Send for JsonProcess
impl Sync for JsonProcess
impl Unpin for JsonProcess
impl UnwindSafe for JsonProcess
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more