pub struct ExportService { /* private fields */ }Expand description
Export service for managing export jobs
Implementations§
Source§impl ExportService
impl ExportService
pub fn new(config: ExportConfig) -> Self
Sourcepub async fn create_export(
&self,
user_id: Uuid,
format: ExportFormat,
categories: Vec<ExportCategory>,
) -> Result<ExportJob, ExportError>
pub async fn create_export( &self, user_id: Uuid, format: ExportFormat, categories: Vec<ExportCategory>, ) -> Result<ExportJob, ExportError>
Create a new export job
Sourcepub async fn get_status(&self, job_id: Uuid) -> Result<ExportJob, ExportError>
pub async fn get_status(&self, job_id: Uuid) -> Result<ExportJob, ExportError>
Get export job status
Sourcepub async fn get_history(
&self,
user_id: Uuid,
limit: usize,
) -> Result<Vec<ExportJob>, ExportError>
pub async fn get_history( &self, user_id: Uuid, limit: usize, ) -> Result<Vec<ExportJob>, ExportError>
Get export history for user
Sourcepub async fn schedule_export(
&self,
user_id: Uuid,
schedule: ScheduledExport,
) -> Result<ScheduledExport, ExportError>
pub async fn schedule_export( &self, user_id: Uuid, schedule: ScheduledExport, ) -> Result<ScheduledExport, ExportError>
Schedule recurring export
Sourcepub async fn process_export(&self, job_id: Uuid) -> Result<(), ExportError>
pub async fn process_export(&self, job_id: Uuid) -> Result<(), ExportError>
Process export job (worker function)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExportService
impl RefUnwindSafe for ExportService
impl Send for ExportService
impl Sync for ExportService
impl Unpin for ExportService
impl UnwindSafe for ExportService
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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