craft-print: document spooler_list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
arnav-hiwarkar
2026-11-06 05:07:25 +05:30
co-authored by Claude Opus 5.5
parent a20c900ce0
commit 81c2488a09
+3
View File
@@ -53,6 +53,9 @@ pub(crate) fn printer_queues() -> Vec<Printer> {
spooler_list(|_| None)
}
/// The spooler's queues (`EnumPrinters`, local queues and connections) with the default marked,
/// each given the two-sided support `two_sided` reports for it; empty when the spooler can't list
/// them.
fn spooler_list(two_sided: impl Fn(&PrinterDevice) -> Option<bool>) -> Vec<Printer> {
match PrinterDevice::all() {
Ok(devices) => crate::printer_list(devices.iter().map(|d| (d.name().to_string(), two_sided(d))), default_printer().as_deref()),