pub struct PDFManager { /* private fields */ }Expand description
Manages PDF files in the jobs directory, ensuring the number of files is within the defined limit.
Implementations§
Source§impl PDFManager
impl PDFManager
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new instance of PDFManager and initializes the list of PDF files.
Sourcepub fn add_pdf_file(&mut self, pdf_file: PathBuf)
pub fn add_pdf_file(&mut self, pdf_file: PathBuf)
Adds a new PDF file to the manager and maintains the directory’s size within the limit.
If the file already exists in the list, it won’t be added again.
Sourcepub async fn _maintain_jobs_directory(&self)
pub async fn _maintain_jobs_directory(&self)
Asynchronous method to manage the job directory and keep the file count within the limit.
This method performs the cleanup operation in a blocking task.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PDFManager
impl RefUnwindSafe for PDFManager
impl Send for PDFManager
impl Sync for PDFManager
impl Unpin for PDFManager
impl UnwindSafe for PDFManager
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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