pub struct BatchFileTriple { /* private fields */ }
Expand description
Represents the batch files associated with a specific index.
Implementations§
Source§impl BatchFileTriple
impl BatchFileTriple
pub async fn log_errors( &self, error_data: &BatchErrorData, ) -> Result<(), BatchErrorProcessingError>
pub async fn retry_failed_requests( &self, error_data: &BatchErrorData, ) -> Result<(), BatchErrorProcessingError>
Source§impl BatchFileTriple
impl BatchFileTriple
pub async fn ensure_input_matches_output_and_error( &self, ) -> Result<(), BatchValidationError>
Source§impl BatchFileTriple
impl BatchFileTriple
pub fn index(&self) -> &BatchIndex
pub fn input(&self) -> &Option<PathBuf>
pub fn output(&self) -> &Option<PathBuf>
pub fn error(&self) -> &Option<PathBuf>
pub fn associated_metadata(&self) -> &Option<PathBuf>
pub fn workspace(&self) -> &Arc<dyn BatchWorkspaceInterface>
Source§impl BatchFileTriple
impl BatchFileTriple
pub fn get_done_directory(&self) -> &PathBuf
pub fn input_filename_which_maybe_does_not_yet_exist(&self) -> PathBuf
pub fn output_filename_which_maybe_does_not_yet_exist(&self) -> PathBuf
pub fn error_filename_which_maybe_does_not_yet_exist(&self) -> PathBuf
pub fn metadata_filename_which_maybe_does_not_yet_exist(&self) -> PathBuf
pub fn set_output_path(&mut self, path: Option<PathBuf>)
pub fn set_error_path(&mut self, path: Option<PathBuf>)
pub fn all_are_none(&self) -> bool
pub fn new_with_requests( requests: &[GptBatchAPIRequest], workspace: Arc<dyn BatchWorkspaceInterface>, ) -> Result<Self, BatchInputCreationError>
pub fn new_direct( index: &BatchIndex, input: Option<PathBuf>, output: Option<PathBuf>, error: Option<PathBuf>, associated_metadata: Option<PathBuf>, workspace: Arc<dyn BatchWorkspaceInterface>, ) -> Self
Source§impl BatchFileTriple
impl BatchFileTriple
pub async fn move_input_and_output_to_done(&self) -> Result<(), FileMoveError>
pub async fn move_input_and_error_to_done(&self) -> Result<(), FileMoveError>
pub async fn move_all_to_done(&self) -> Result<(), FileMoveError>
Source§impl BatchFileTriple
impl BatchFileTriple
pub async fn ensure_input_matches_output( &self, ) -> Result<(), BatchValidationError>
Source§impl BatchFileTriple
impl BatchFileTriple
pub async fn ensure_input_matches_error( &self, ) -> Result<(), BatchValidationError>
Trait Implementations§
Source§impl Clone for BatchFileTriple
impl Clone for BatchFileTriple
Source§fn clone(&self) -> BatchFileTriple
fn clone(&self) -> BatchFileTriple
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BatchFileTriple
impl Debug for BatchFileTriple
Source§impl From<&BatchFileTriple> for BatchFileState
impl From<&BatchFileTriple> for BatchFileState
Source§fn from(triple: &BatchFileTriple) -> BatchFileState
fn from(triple: &BatchFileTriple) -> BatchFileState
Determines the state of the batch files.
Source§impl Ord for BatchFileTriple
impl Ord for BatchFileTriple
Source§impl PartialEq for BatchFileTriple
impl PartialEq for BatchFileTriple
Source§impl PartialOrd for BatchFileTriple
impl PartialOrd for BatchFileTriple
impl Eq for BatchFileTriple
impl Send for BatchFileTriple
impl Sync for BatchFileTriple
Auto Trait Implementations§
impl Freeze for BatchFileTriple
impl !RefUnwindSafe for BatchFileTriple
impl Unpin for BatchFileTriple
impl !UnwindSafe for BatchFileTriple
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