pub struct SqlitePrintStationRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqlitePrintStationRepository
impl SqlitePrintStationRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqlitePrintStationRepository
impl Debug for SqlitePrintStationRepository
Source§impl PrintStationRepository for SqlitePrintStationRepository
impl PrintStationRepository for SqlitePrintStationRepository
Source§fn pair(&self, input: CreatePrintStation) -> Result<PairStationResult>
fn pair(&self, input: CreatePrintStation) -> Result<PairStationResult>
Pair a new print station, returning the station and its one-time token.
Source§fn list_stations(&self) -> Result<Vec<PrintStation>>
fn list_stations(&self) -> Result<Vec<PrintStation>>
List paired stations (most recently paired first).
Source§fn get_station(&self, id: PrintStationId) -> Result<Option<PrintStation>>
fn get_station(&self, id: PrintStationId) -> Result<Option<PrintStation>>
Get a station by ID.
Source§fn revoke_station(&self, id: PrintStationId) -> Result<PrintStation>
fn revoke_station(&self, id: PrintStationId) -> Result<PrintStation>
Revoke a station’s token.
Source§fn enqueue_job(
&self,
station_id: PrintStationId,
input: EnqueuePrintJob,
) -> Result<PrintJob>
fn enqueue_job( &self, station_id: PrintStationId, input: EnqueuePrintJob, ) -> Result<PrintJob>
Enqueue a print job to a station. Errors if the station is revoked.
Source§fn next_job(&self, station_id: PrintStationId) -> Result<Option<PrintJob>>
fn next_job(&self, station_id: PrintStationId) -> Result<Option<PrintJob>>
Pick up the next queued job for a station (agent long-poll), marking it
picked up and updating the station’s last-seen time. Returns
None when
the queue is empty.Source§fn complete_job(&self, job_id: PrintJobId, success: bool) -> Result<PrintJob>
fn complete_job(&self, job_id: PrintJobId, success: bool) -> Result<PrintJob>
Mark a job printed (
success = true) or failed.Source§fn list_jobs(
&self,
station_id: PrintStationId,
filter: PrintJobFilter,
) -> Result<Vec<PrintJob>>
fn list_jobs( &self, station_id: PrintStationId, filter: PrintJobFilter, ) -> Result<Vec<PrintJob>>
List jobs for a station.
Auto Trait Implementations§
impl !RefUnwindSafe for SqlitePrintStationRepository
impl !UnwindSafe for SqlitePrintStationRepository
impl Freeze for SqlitePrintStationRepository
impl Send for SqlitePrintStationRepository
impl Sync for SqlitePrintStationRepository
impl Unpin for SqlitePrintStationRepository
impl UnsafeUnpin for SqlitePrintStationRepository
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